How to handle automation interference correctly?

I have a simple motion sensor automation set up that turns on a light for 1 minute when motion is detected (but only when its dark outside). However, when I am in that room at and turn on the light manually because I am doing a long task (rather than quickly going in to grab something from storage), my automations keep turning the light off (and on when the motion sensor is triggered). I want the light to stay on when I turn it on manually.

Another problem I can see emerging in the near future as the number of automations in my system increases is that automations start to interfere with each other. E.g. an automation triggered by a certain light sensor value might get incorrectly triggered ebcause another automation switched on the light in that room. (possibly a bad example).

Is there a built in way to deal with this? Do you have any advise or guidelines about how to avoid these problems?

For some things, I’m turning automations off (and on again) from other automations.

As things get more complicated, I can see that I’ll likely turn to using either MQTT or the command line switch and sensor to allow the creation of “flags” that I can set and check. Moving everything to AppDaemon would be cleaner and simpler I suspect, but I’ll need to brush up on my Python first.

1 Like