A while ago I’ve had an automation for every automation I needed, lights on at 7:00, lights off at 8:30, lights on at 16:30, lights off at 22:30 where all single automations. The name of the automation told what it did; “switch - 07:00 switch lights on”, “notification - notify if a outsidedoor was left open”, etc. Now I’ve combined multiple automations and make use of the Trigger ID and use choose to run the automation I need. The benefit is that I’ve got less automations in my overview, the downside is that it is harder to debug an automation. How have you guys/girls arranged your automations.
Let’s call it a horrible mix of single automations, choose combined automations and Node red automations.
When I need to find something specific it can take a while.
There is a faster way but I usually forget about it:
This does not include the automations in Node red though
I only combine them up to the point that they get hard to read and/or debug if combined.
it’s not an “either/or”. it’s a “mix & match”.
Agreed. Once you start nesting choose
it can get a little out of hand.
Likewise, I don’t always use Trigger ID either. It has the inherent constraint that should you ever wish to use the service call automation.trigger
, you no longer have the trigger id and choose will always use the default since it was an external execution.
For that reason, I use a condition that matches the trigger in my choose
option. So while it may seem redundant at first glance, it allows me to now use the automation like a script (if needed) without having to write a separate script. This flexibility has been useful.
The flexibility of HA often means there is no right answer. It depends on use-case, experience, and where you are in your HA learning journey.
I am only a beginner at this myself. However, I have shifted from single automations to combined automations and from conditions to trigger IDs. For me, using trigger IDs helped simplify and streamline automations. I also find it easier to debug when all the rules and actions for a device appear on the same trace screen.
I am still trying to optimise my automations to the fewest conditions and lines to still achieve my intent. The goal here is to get into the good habit of only having HA run an automation when it really needs to. For instance, I use a single automation to turn on/off all my nighttime automations during the day so a motion sensor doesn’t trigger an automation, only for that automation to check a condition telling it not to fire during the day.
A further goals is to use templates and scripting to further streamline the process. I am a ways off that yet.
YMMV
I’ve reverted to having most automations seperated from others. Now I have 30 automations
You can use trace to debug if/when you need it.