Hi everybody,
since variables have been introduced, I try to implement them where ever I can. Unfortunately, the seem not to work when using the condition.
Example
This will not work
automation:
- alias: "[Hei] AZ Morgens"
trigger:
- platform: time
at: input_datetime.az_morgens
variables:
temperatur: input_number.az_morgens
heizung: climate.arbeitszimmer_heizung_climate
fenster: input_boolean.az_fenster
condition:
- condition: state
entity_id: "{{ fenster }}"
state: "off"
action:
- service: climate.set_temperature
data_template:
entity_id: "{{ heizung }}"
temperature: "{{ states(temperatur) }}"
This will work
automation:
- alias: "[Hei] AZ Morgens"
trigger:
- platform: time
at: input_datetime.az_morgens
variables:
temperatur: input_number.az_morgens
heizung: climate.arbeitszimmer_heizung_climate
fenster: input_boolean.az_fenster
condition:
- condition: state
entity_id: input_boolean.az_fenster # changed this part only
state: "off"
action:
- service: climate.set_temperature
data_template:
entity_id: "{{ heizung }}"
temperature: "{{ states(temperatur) }}"
Is this something that will be considered in future releases? Or should I just stick to hard coding the input_boolean
part of the code? I have this automation at least twice per room (morning, evening, perhaps night and/or afternoon).
Thank you in advance for your feedback