Trying to setup a automation that could apply on my 3 climate entities.
I want the ‘climate’ action triggered by the corresponding sensor.
Here where I am today after multiple tries, but not working so far even I think I’m close.
I took care to name my entities with same name when they are supposed to work together.
My climate are named ‘climate.thermostat.name1’ name2 etc…
alias: Climate turn off when window open
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.window_name1_opening
- binary_sensor.window_name2_opening
- binary_sensor.window_name3_opening
from: "off"
to: "on"
for:
hours: 0
minutes: 0
seconds: 0
condition: []
action:
- service: climate.turn_off
metadata: {}
data: {}
target:
entity_id: |
climate.thermostat_{{ trigger.to_state.object_id.split('_')[3] }}
mode: single