#Manually set context in Automation?

1 messages · Page 1 of 1 (latest)

desert ridge
#

Heyo. I figured out that I can check whether an entity was changed by an automation vs manually through the UI or a voice assistant. I do this by checking
{{ trigger.to_state.context.user_id is not none }}
BUT: My shelly switches also control the lamps through an automation... So even though I manually flick the switch on the wall, the above template would treat it as non-manual. Is there a way I can set the context manually in my wall switch automation so I can distinguish between lights changed by a "real automation" and lights changed by the "manual wall switch automation"?

Use case is a cinema mode which should turn off, if anyone manipulates a set of lights manually.

rustic ravine