Skip to content

Instantly share code, notes, and snippets.

@MackoMici
Forked from f45tb00t/heating.yaml
Last active January 21, 2026 11:08
Show Gist options
  • Select an option

  • Save MackoMici/c127d5eb877dab4dc0cf1c1341f57763 to your computer and use it in GitHub Desktop.

Select an option

Save MackoMici/c127d5eb877dab4dc0cf1c1341f57763 to your computer and use it in GitHub Desktop.
Home Assistant Blueprint For Heating
blueprint:
name: Fűtés automatikus vezérlés
description: Előfűtés, ablak figyelés és több féle hőmérséklet adott napon adott időben a fűtés vezérléshez.
domain: automation
input:
# előfüttés változói
elofutes:
name: Előfűtés
description: Előfűtés bekapcsoláshoz kapcsoló, csak ha távol vagyunk és adott hőmérsékletnél hidegebb van kint, valamint az ablakok csukva vannak.
selector:
entity:
domain: input_boolean
#általános változók
family:
name: Családi eszközök csoportja
description: Azt a csoportot kell megadni ami alapján tudjuk figyelni, hogy van-e otthon valaki.
default: []
selector:
entity:
domain: group
family_off:
name: Család távol x perce
description: Család mennyi ideje legyen távol.
default: 2
selector: &time
number:
min: 1
max: 10
step: 1
mode: slider
window_sensor:
name: Ablak csoport érzékelő
description: Ablakok nyitás érzékelő csoportja.
selector:
entity:
domain: binary_sensor
device_class: window
windows_on:
name: Ablak nyitva x perce
description: Az ablak hány perce van nyitva.
default: 5
selector: *time
thermostat:
name: Termosztát
description: A használni kívánt termosztát.
selector:
entity:
domain: climate
workday:
name: Workday Sensor
description: Munkanapok figyelése.
selector:
entity:
domain: binary_sensor
manual_control:
name: Manuális vezérlés
description: ha nem szeretnénk hogy az automata vezérelje a fűtést.
selector:
entity:
domain: input_boolean
#hőmérsékleti változók
out_temp_sensor:
name: Hőmérséklet szenzor
description: Külső hőmérséklet szenzor.
selector:
entity:
domain: sensor
out_lower_temp:
name: Kinti hőmérséklet érték
description: Milyen kinti hőmérséklet alatt kapcsoljon be a fűtés.
selector:
entity:
domain: input_number
nappali_temp:
name: Nappali hőmérséklet
description: Mennyire fűtsük a lakást reggel, napközben ha otthon vagyunk vagy előfűtéskor illetve ha már nem dolgozunk vagy hétvégén napközben.
selector:
entity:
domain: input_number
ejszakai_temp:
name: Éjszakai hőmérséklet
description: Mennyire fűtsük a lakást éjszaka.
selector:
entity:
domain: input_number
napkozben_temp:
name: Napközbeni hőmérséklet
description: Mennyire fűtsük a lakást ha éppen dolgozunk.
selector:
entity:
domain: input_number
#idő változók
ejszaka_kezdete:
name: Éjszakai hőmérséklet időpontja
description: Mikor váltsuk át a kazánt éjszakai hőmérsékletre.
selector:
entity:
domain: input_datetime
reggel_kezdete:
name: Reggeli hőmérséklet időpontja
description: Mikor váltsuk át a kazánt reggeli hőmérsékletre.
selector:
entity:
domain: input_datetime
hetvege_kezdete:
name: Hétvége hőmérséklet időpontja
description: Mikor váltsuk át a kazánt hétvége hőmérsékletre.
selector:
entity:
domain: input_datetime
napközben_vege:
name: Napközbeni hőmérséklet időpontja
description: Mikor váltsuk át a kazánt fűttésre ha már lassan vége a munkaidőnek és indulunk haza.
selector:
entity:
domain: input_datetime
variables:
out_temp_sensor: !input out_temp_sensor
out_t: '{{ states(out_temp_sensor) | float(0) }}'
out_lower_temp: !input out_lower_temp
out_lt: '{{ states(out_lower_temp) | float(0) }}'
nappali_temp: !input nappali_temp
nappali_t: '{{ states(nappali_temp) | float(0) }}'
ejszakai_temp: !input ejszakai_temp
ejszakai_t: '{{ states(ejszakai_temp) | float(0) }}'
napkozben_temp: !input napkozben_temp
napkozben_t: '{{ states(napkozben_temp) | float(0) }}'
thermostat: !input thermostat
thermostat_temp: '{{ state_attr(thermostat, "temperature") }}'
triggers:
- trigger: state
entity_id: !input window_sensor
id: window_off
to: 'off'
- trigger: state
entity_id: !input window_sensor
id: window_on
for:
minutes: !input 'windows_on'
to: 'on'
- trigger: state
entity_id: !input family
id: family_not_home
for:
minutes: !input 'family_off'
to: 'not_home'
- trigger: state
entity_id: !input family
to: 'home'
- trigger: state
entity_id:
- !input elofutes
- !input out_temp_sensor
- !input out_lower_temp
- !input nappali_temp
- !input ejszakai_temp
- !input napkozben_temp
- !input manual_control
- platform: time
at:
- !input ejszaka_kezdete
- !input reggel_kezdete
- !input napközben_vege
- !input hetvege_kezdete
actions:
- choose:
# automatizáció tiltva
- conditions:
- condition: state
entity_id: !input 'manual_control'
state: 'on'
sequence:
# ablak nyitás vezérlés
- conditions:
- condition: trigger
id: window_on
- condition: state
entity_id: !input window_sensor
state: 'on'
sequence:
- action: climate.set_hvac_mode
data:
entity_id: !input thermostat
hvac_mode: 'off'
# ablak zárás vezérlés
- conditions:
- condition: trigger
id: window_off
- condition: state
entity_id: !input window_sensor
state: 'off'
sequence:
- action: climate.set_hvac_mode
data:
entity_id: !input thermostat
hvac_mode: 'heat'
# előfűtés kikapcsolás ha hazaérünk
- conditions:
- condition: state
entity_id: !input elofutes
state: 'on'
- condition: state
entity_id: !input family
state: 'home'
sequence:
- action: input_boolean.turn_off
target:
entity_id: !input elofutes
#ha magas a kinti hőmérséklet kapcsolja ki a fűtést
- conditions:
- condition: state
entity_id: !input elofutes
state: 'off'
- condition: template
value_template: '{{ out_t > out_lt}}'
sequence:
- action: climate.set_hvac_mode
data:
entity_id: !input thermostat
hvac_mode: 'off'
# előfűtés bekapcsolás csak ha nem vagyunk otthon és csukva van az ablak
- conditions:
- condition: state
entity_id: !input elofutes
state: 'on'
- condition: state
entity_id: !input window_sensor
state: 'off'
- condition: state
entity_id: !input family
state: 'not_home'
- condition: template
value_template: '{{ nappali_t != thermostat_temp }}'
- condition: template
value_template: '{{ out_t < out_lt}}'
sequence:
- if:
- condition: state
entity_id: !input thermostat
state: "off"
then:
- action: climate.set_hvac_mode
data:
entity_id: !input thermostat
hvac_mode: heat
- action: climate.set_temperature
data:
entity_id: !input thermostat
temperature: '{{ nappali_t }}'
# éjszakai fűtés ha megadott időpont eltelt akkor állítsa át a hőmérsékletett
- conditions:
- condition: template
value_template: '{{ out_t < out_lt}}'
- condition: time
after: !input ejszaka_kezdete
before: !input reggel_kezdete
- condition: state
entity_id: !input window_sensor
state: 'off'
- condition: template
value_template: '{{ ejszakai_t != thermostat_temp }}'
- condition: state
entity_id: !input family
state: home
sequence:
- if:
- condition: state
entity_id: !input thermostat
state: "off"
then:
- action: climate.set_hvac_mode
data:
entity_id: !input thermostat
hvac_mode: heat
- action: climate.set_temperature
data:
entity_id: !input thermostat
temperature: '{{ ejszakai_t }}'
# hétvégi fűtés ha megadott időpont eltelt akkor állítsa át a hőmérsékletett
- conditions:
- condition: template
value_template: '{{ out_t < out_lt}}'
- condition: time
after: !input hetvege_kezdete
before: !input ejszaka_kezdete
- condition: state
entity_id: !input window_sensor
state: 'off'
- condition: template
value_template: '{{ nappali_t != thermostat_temp }}'
- condition: state
entity_id: !input family
state: home
- condition: state
entity_id: !input workday
state: 'off'
sequence:
- if:
- condition: state
entity_id: !input thermostat
state: "off"
then:
- action: climate.set_hvac_mode
data:
entity_id: !input thermostat
hvac_mode: heat
- action: climate.set_temperature
data:
entity_id: !input thermostat
temperature: '{{ nappali_t }}'
# reggeli fűtés ha megadott időpont eltelt akkor állítsa át a hőmérsékletett
- conditions:
- condition: template
value_template: '{{ out_t < out_lt}}'
- condition: time
after: !input reggel_kezdete
before: !input ejszaka_kezdete
- condition: state
entity_id: !input window_sensor
state: 'off'
- condition: template
value_template: '{{ nappali_t != thermostat_temp }}'
- condition: state
entity_id: !input family
state: home
- condition: state
entity_id: !input workday
state: 'on'
sequence:
- if:
- condition: state
entity_id: !input thermostat
state: "off"
then:
- action: climate.set_hvac_mode
data:
entity_id: !input thermostat
hvac_mode: heat
- action: climate.set_temperature
data:
entity_id: !input thermostat
temperature: '{{ nappali_t }}'
# napközben ha nem vagyunk otthon akkor állítsa át a hőmérsékletett
- conditions:
- condition: trigger
id: family_not_home
- condition: template
value_template: '{{ out_t < out_lt}}'
- condition: template
value_template: '{{ napkozben_t != thermostat_temp }}'
- condition: state
entity_id: !input family
state: not_home
sequence:
- if:
- condition: state
entity_id: !input thermostat
state: "off"
then:
- action: climate.set_hvac_mode
data:
entity_id: !input thermostat
hvac_mode: heat
- action: climate.set_temperature
data:
entity_id: !input thermostat
temperature: '{{ napkozben_t }}'
# napközben előfűtés kézi kikapcsolás
- conditions:
- condition: state
entity_id: !input elofutes
state: 'on'
- condition: template
value_template: '{{ out_t < out_lt}}'
- condition: template
value_template: '{{ napkozben_t != thermostat_temp }}'
- condition: state
entity_id: !input family
state: not_home
sequence:
- if:
- condition: state
entity_id: !input thermostat
state: "off"
then:
- action: climate.set_hvac_mode
data:
entity_id: !input thermostat
hvac_mode: heat
- action: climate.set_temperature
data:
entity_id: !input thermostat
temperature: '{{ napkozben_t }}'
# napközben ha lassan hazaérünk fűtés ha megadott időpont eltelt akkor állítsa át a hőmérsékletett
- conditions:
- condition: template
value_template: '{{ out_t < out_lt}}'
- condition: time
after: !input napközben_vege
- condition: state
entity_id: !input window_sensor
state: 'off'
- condition: state
entity_id: !input workday
state: 'on'
- condition: template
value_template: '{{ nappali_t != thermostat_temp }}'
- condition: state
entity_id: !input family
state: not_home
sequence:
- if:
- condition: state
entity_id: !input thermostat
state: "off"
then:
- action: climate.set_hvac_mode
data:
entity_id: !input thermostat
hvac_mode: heat
- action: climate.set_temperature
data:
entity_id: !input thermostat
temperature: '{{ nappali_t }}'
mode: queued
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment