tom_l
October 5, 2023, 6:58pm
13
Here’s another way to do it using a template sensor. It’s only useful if you use the context a lot and don’t want to keep writing out all the conditions:
You do. All automation triggers change the context.
What you need to do is store the context when the switch turns on. You need to check all three contexts as per the table:
[Screenshot 2022-06-21 081430]
Then use that when your no-motion automation runs.
e.g. this triggered template sensor will save the switch context when it turns on:
(configuration.yaml)
template:
- trigger:
- platform: state
entity_id: switch.shelly_1pm_garage_switch_0
to: "on"
sensor:
- na…