#Idiomatic/Best multi-condition approach.

1 messages · Page 1 of 1 (latest)

echo trellis
#

I'm new to HA, but as I think about what I want to automate more, I can see several approaches with what I know of HA. My question is, what is the best to use in HA. I am confident I can make it behave correctly, but what's the proper way to structure it. Is there any document of Best Practices?

Let me give an example: When somebody is not at home home, but they are in-town, and it's dark out I would like the porch/driveway lights on. So three conditions, each of which might be a trigger to turn the lights on. Furthermore, when we do come home, turn the lights off after set delay (or ultimately, the garage door closes).

It this a single automation with 4 triggers? Is it two automations, one with 3 triggers and one with 1. Is it 4 automations? Should it be encapsulated in scenes or scripts? Should I introduce some persistent state?

errant marsh
#

As long ad you are not turning the actual automations on and off for short term actions, anything else is fine. Do it the way the voices in your head tell you to do it.