Hi,
In the winter I have an automation that when pushing the switch in the bedroom, all devices turn off and also the heating is put into “Eco” (low temperature) preset mode.
When I’m away, I have a template to ignore it, no problem with that.
As the better weather is approaching I’m shutting down the heating.
That means HVAC mode is switched to “off”.
Now the tricky part… When pushing the bedroom switch, it puts the “Eco” mode back on, and the HVAC is pushed into heating again.
I’m having a struggle to wrap my head around this issue…
How to tell the switch to ignore the hvac preset mode when the hvac mode is switched to “off”.
This is the code i have:
action:
- service: switch.turn_off
entity_id:
- switch.printers
- service: climate.set_preset_mode
data_template:
entity_id: climate.slauer
preset_mode: >-
{% if is_state("climate.slauer" , "off") %}
null
{% elif is_state_attr("climate.slauer" , "preset_mode" , "away") %}
away
{% else %}
eco
{% endif %}
- service: homeassistant.turn_off
entity_id:
- automation.trap_pir_aan
btw, the null does not work also