Particular month schedule trigger

Hello,
How can I add a month condition to a scene?
For example, turn on light only in July and September of every year.

Thank you,
Roberto

The rapid way is some lua code, added into “also run this lua code”. The code should return true if the scene has to be run, so it’s basically stopping or allowing the scene after the triggers are fired.

In your case, this is the code:

local currentTime = os.date("*t")
return currentTime.month >=7 and currentTime.month <=9 -- summer only

Change your code accordingly.

2 Likes

Other options are PLEG and Reactor. I have a wall outlet that is controlled from mid-November to mid-January. I plug my Christmas Tree into it. It turns off the outlet in any mode but Home. I first set this up in PLEG a few years ago, and migrated the logic to Reactor late last year.

1 Like

Thank you very much therealdb.
It works great !!!

Regards,
Roberto