Setting scenes for single switch

Newbie question (again).

I have a single switch setup to turn on my porch light. If I want it to come on automatically at a certain time, then go off at a later time, it looks like I need to create two separate scenes (one for ON, one for OFF), and set a schedule for each. Is that correct.

Seems to work… but I didn’t know if there was a simpler way to do it.

Yes that is the normal way to do it. If/when your logic gets more complex, I recommend that you look into the Program Logic Event Generator (PLEG) plugin. You will find masses of information and examples in the dedicated board.


And you might even look at PLEG for this simple setup …

It allows you to create two conditions … and actions for the two conditions.
So everything is one place.
You can define a single (interval) timer schedule. Specify the On time and the Off Time. Name this timer something like LightSchedule

Then the two conditions are:
LightOn LightSchedule
LightOff Not LightSchedue

To disable this auto behavior … disarm the PLEG.

Do the Status report and see all of this logic in a nice report.

That’s good advice from @RichardTSchaefer. Most people eventually use PLEG to implement their logic. You may as well start now whilst your requirements are easy to understand. You will not regret learning how to use PLEG, I promise you.