Bypass automation with ios app

Hi, I’m thinking of starting a project with Home Assistant, but I need to carefully plan everything, and perhaps you can guide me with your experience.

I want my iOS app to override all my light automation. For instance, if an automation is set to turn on the light every 10 minutes, but I manually turn it off on my iOS app, I’d like it not to turn on automatically (perhaps with a timeout, maybe 30 minutes?).

Use Case:

In the early morning, to avoid waking everyone up, the lights should automatically turn off when there’s no motion. However, if someone needs to keep the lights on, they can bypass this automation using the app.

During the day, if the baby falls asleep in the living room, and the lights need to be off any automation that would turn on the lights would be disabled by turning it off in the app.

I was thinking of creating a bypass boolean switch and having every automation check the switch’s status before running. The iOS app button would enable or disable this switch. Is this a good approach? I’m also concerned about the possibility of an automation who don’t re-enabling the switch before 30 minutes, because the automation to crash or something and leaving the switch stuck in disabled mode. In this scenario, none of my automations would run until I manually re-enable it.

So, what do you suggest?

Interesting problem. Sometimes you need to cancel or delay an upcoming automation. That doesn’t sound too difficult - your idea of using boolean switch (toggle) should work well:

  1. Create a toggle helper “Cancel next automation”
  2. Add condition to all automations to only run if the toggle is off
  3. Make automations reset the toggle to off if it was on

That will cancel the immediate next automation and others will keep running.

Or, if you want to cancel all automations for a period of time, instead of (3) create a new automation which triggers of the toggle being set to on, waits for e.g. 30 minutes, and then set it to off.

What makes things confusing is if you try to cancel automation by the action of turning off living room lights in iOS (but not with physical switch) rather than a separate toggle to just control automations. This is how it could be done:

  1. Create a toggle “Cancel next automation”
  2. Create a toggle “Living room light”
  3. Place the “Living room light” toggle on a dashboard for iOS users
  4. Create an automation which would trigger of “Living room light” changing to “off”. Make that automation set “Cancel next automation” to “on” and set actual living room light to “off”
  5. Update your other lights automations to only trigger when the “Cancel next automation” is “off” and to set “Cancel next automation” to “off” it was on

But I doubt this will be a good experience. There will be times when you will need to turn off the lights briefly without canceling automations. It will be confusing to users what’s going on. I would suggest keeping automation control and lights control separate, as two separate switches in dashboard.