@prankousky wrote:
Hi everybody,
below is my automation for toggling an
SPZB0001
zigbee thermostat depending on the window state (determined by aXiaomi Aqara Door Sensor
). Unfortunately, it does not work. I am not quote sure what I am doing wrong, so would somebody please guide me in the right direction?I have read the docs, that why I don’t understand how this could be wrong… It should set the
hvac_mode
depending on the window state…?Thank you in advance for your ideas
automation: - id: "heizung_az_aus" alias: "[Heizung] AZ Aus" trigger: - platform: state entity_id: binary_sensor.arbeitszimmer_fenster_contact action: - service: climate.set_hvac_mode entity_id: climate.arbeitszimmer_heizung_climate service_template: hvac_mode: > {% if states("binary_sensor.arbeitszimmer_fenster_contact") == "on" %} "off" {% elif states("binary_sensor.arbeitszimmer_fenster_contact") == "off" %} "on" {% endif %}
I have also tried this
automation: - id: "heizung_az_aus" alias: "[Heizung] AZ Aus" trigger: - platform: state entity_id: binary_sensor.arbeitszimmer_fenster_contact action: - service: climate.set_hvac_mode data_template: entity_id: climate.arbeitszimmer_heizung_climate hvac_mode: > {% if states("binary_sensor.arbeitszimmer_fenster_contact") == "on" %} "off" {% elif states("binary_sensor.arbeitszimmer_fenster_contact") == "off" %} "on" {% endif %}
Posts: 9
Participants: 5