Hi,
I’m using ESPresense to track a device within my home.
I want my automation to turn off two switches when the tracked device enter a specific room. When the device leave the room, I want the switches to turn on again. I want this in a single automation (making it in two automations are really easy).
I’ve made an automation that do this, but I don’t find it robust enough using toggle
. Was looking into using trigger and using template under a condition
, or perhaps if-then-else
?
@tom_l Any ideas? You’re the guru here
- alias: 42 - S22U in the Office
id: S22U in the Office
trigger:
- platform: state
entity_id: sensor.s22ultra
to: "kontor"
- platform: state
entity_id: sensor.s22ultra
from: "kontor"
action:
- service: switch.toggle
entity_id: switch.kontor_recordings, switch.kontor_snapshots