I had this automation working at some point but I broke it, and now I don't understand why it doesn't work properly.
It's all about the condition to distinguish if a light was toggled manually, or UI, or by an automation.
Atm I want this timer to run either if it was toggled manually or UI.
Here's the relevant bit of the automation trace when triggered by UI. Parent is clearly null, so none should be working. But it isn't.
Full step trace attached.
context:
id: 01K77QFWB8BTMV8Z24WHRFFVMH
parent_id: null
user_id: fd5af314dfad4f499cfc3a6e7029dbf2
Relevant automation condition. Attached full automation.
{{ trigger.to_state.context.parent_id is none }}
I had issues using variables, so I removed them. But it didn't fix it.
Thanks!