Heizung set Default Temperatur
Per Push Button lässt sich die Temperatur aus den Speicher Entitäten an das Thermostat senden.
Code:
alias: Heizung Set Default Temperature
description: ""
trigger:
- platform: state
entity_id:
- input_button.set_zeitplan_wc
- input_button.set_zeitplan_eingang
- ...input_button.set_zeitplan_flur
- input_button.set_zeitplan_buero
- input_button.set_zeitplan_werkstatt
- input_button.set_zeitplan_ez
- input_button.set_zeitplan_wz
- input_button.set_zeitplan_sz
- input_button.set_zeitplan_gruen
- input_button.set_zeitplan_rosa
- input_button.set_zeitplan_lydi
- input_button.set_zeitplan_kinderbad
- input_button.set_zeitplan_carrera
- input_button.set_zeitplan_wcdg
- input_button.set_zeitplan_studio
condition:
- condition: state
entity_id: input_boolean.urlaub
state: "off"
action:
- variables:
room: "{{ trigger.entity_id.split('_')[3] }}"
device: "{{ 'climate.thermostat_' + room }}"
comfort: "{{ 'input_number.thermostat_' + room + '_comfort' }}"
eco: "{{ 'input_number.thermostat_' + room + '_eco' }}"
device_temp: "{{ state_attr( device, 'temperature') }}"
eco_temp: "{{ states(eco) }}"
comfort_temp: "{{ states(comfort) }}"
scheduler: "{{ 'schedule.heizung_' + room + '_eco' }}"
scheduler_state: "{{ states(scheduler) | bool }}"
scheduler_switch: "{{ states('input_boolean.heizung_' + room + '_zeitplan') | bool }}"
temp: |
{% if scheduler_state %}
{{ eco_temp }}
{% else %}
{{ comfort_temp }}
{% endif %}
- service: climate.set_temperaturescript.turn_on
data:
hvac_mode:variables:
heatroom: temperature:"{{ room }}"
temp: "{{ temp }}"
target:
entity_id: "{{ device }}"script.heizung_set_temperature
mode: parallel
max: 20