I have been trying to tackle an automation for a little while now. Its one of those that has evolved as I’ve used it more.
The setup is I have two doors in to my garage. When either door is opened, the lights in the garage turn on. Simple so far!
When BOTH doors are closed, but the lights are ON, the lights get turned off, and I get a notification to my phone stating as such. Also, pretty simple!
However, with winter coming, there will be times where I am in the garage, with the doors closed and want the lights to remain on.
What I would like is an actionable notification on my phone that asks if I want to keep the lights on or not.
If I say “Yes”, then the automation ends, no action is taken, the lights stay on (until the next time all the doors become “Closed” i.e. I have left the garage)
If I say “No” I would like the lights to turn off.
Then, to add further complication, I would also like a timeout on this so that if no response is recevied in 5minutes, the lights turn off anyway.
Can you show the automation you already have in yaml so maybe someone can edit it for you, also it should show us whether your using iOS or Android for example?
The simplest way to allow for an occasional exception is to add an input_boolean which gives a toggle switch in the UI. This can then be added to automations so one toggle turns off actions.
Settings → Devices & Services → Helpers
Example - I have a toggle for night mode so that my lighting automation can be disabled or enabled at will:
- condition: state
entity_id: input_boolean.night_mode
state: 'on'
Add a Garage Work Mode and disable the OFF as needed manually. I’d also add a timed automation to turn the lights OFF and Work Mode OFF when you forget!
The same technique is really handy for things like morning alarm clocks - just disable them once when you’ve had a late night, and you get one sleep in.
At the moment I have the following behaviour:
Notification received if all the garage doors are shut and either of the lights are on
If I send “Turn Off The Lights” the lights turn off
If I do nothing, the lights turn off (Continue on Timeout: True, although not explicitly stated in the yaml)
I don’t have the creme de le creme action of “Do Nothing” when “Keep Lights On” is pressed.
I’m trying to work out how to automate the toggling of your suggestion @FloatingBloater from the “KEEP_LIGHTS_ON” response and use that as the qualifier. But however I cut it, there doesn’t seem to be a way to separate out the two potential outcomes.