Turn lights on at sundown or 7pm, whichever is earlier

I assume this will be an easy one, but I’m a total node-red noob: for my vacation mode, I want the lights to come on at sundown or at 7pm, whichever is earlier. That way, in the summer months, the house doesn’t stay dark until ~9pm when the sun finally goes down. Any advice?

Right now I’m using bigtimer and have it triggering off just sundown. Maybe I can combine this with another bigtimer and use OR logic to achieve what I want? Should I just have 2 bigtimers that feed into the same sequence? I’ll have the “repeat every 1 minute” option enabled, so I was worried about 2 timers causing the lights to turn on and off repeatedly, if one ever wants them on while the other wants them off (maybe due to random offset).

Just use two triggers. One for 7pm and the other at sundown. So whichever trigger happens first it turns on the lights.

No need for any timers at all.

Thanks for the reply. Do you mean the HA - trigger state node or the core function - trigger node? With your suggestion, how could i include a random offset and a repeat every ~1 minute as with bigtimer?

I’m also wondering how I could combine triggers with AND, e.g. if I wanted the lights to turn on if it’s after 7pm AND after sunset.

The flexibility of node-red has been both a blessing and a curse…I know there are 100 ways to do these things but it’s tough to narrow it down.

Are you saying you are doing this automation now in Node-Red (I don’t know what “Bigtimer” is…)? If so you should state that in your post or as a tag. I don’t know anything about Node-Red.

My suggestion was for triggers in a HA automation.

If you want “and” triggers then you can put both triggers into the automation conditions then it will only run the actions on a trigger if both triggers are true at the same time (verified by the conditions).

Oh yeah that’s my bad, I meant to post this in the node-red subforum, but guess the tag dropped off somehow.

Flagging my own post here as off topic since I screwed up the tags, and reposting under node red.

Mod edit: Closing due to OP’s request, discussion continued here: Turn the lights on at sundown or 7pm, whichever is earlier