Time range with variable offset


I want to have a time range check, with an offset which is calculated daily and saved to a variable. I have tried the time range node, but I can’t get it to take a variable in the offset option inputs. I am also looking for a trigger with the same ability.

Automation I am trying to achieve:

if (anyone arrives home and time is after sunset - offset)
   or (sunset - offset is reached and someone is already home)
then turn on light

Any ideas?

You could try taking all the required messages from the nodes and simply calculate your desired results in a function node.

1 Like

This had crossed my mind, but I assumed I was missing something obvious as it seemed like a function many people would want and therefore something which would already be implemented.

Seems like the EZTimer can do what you need.

1 Like

Thank you, I will take a look.