#Best way to create a "time window" for an automation? (and other questions)

1 messages · Page 1 of 1 (latest)

cold pilot
#

Hello,

I'm trying to figure out the best logic to basically have an automation only really start monitoring at a certain hour.

Like if it's after 10:30 and then the occupancy sensor goes to unoccupied turn off the lights. That's simple enough.

But would I just have an automation be "occupancy sensor state becomes unoccupied" and then an "and if it's after 10:30?"

Wouldn't that have a ton of not triggered throughout the day? Is there a better way to do it or are automation checks like that not resource intensive? I'm just wondering if it's it's like overkill to have something happen literally once a day, but listen for the intial "trigger" multiple times a day..

I hope that makes sense....

dull tulip
#

It wouldn't be resource intensive for it to trigger throughout the day

cold pilot
dull tulip
#

I'd imagine it's pretty standard. I know I certainly do that at least

#

The alternatives would be kind of overkill IMO:

  1. Create an input_boolean to use as a condition in the automation, and turn the boolean on/off with another automation based on the time range you want the main automation to fire
  2. Create an automation that turns the main automation on/off at the appropriate times
zenith cobalt
#

The "became unoccupied" event will still happen, with or without a trigger. Checking the condition is little overhead and just what you want to do.

civic bluff
#

I think you have no other option