Today, to control a device on a schedule, you need two scenes:
one to turn it on, one to turn it off, each with its own scheduled trigger, and
you have to keep them consistent. If you add a time slot for the weekend,
you have to remember to update both sides.
This PR adds a new type of scheduled trigger, « Time Slots », which allows
you to put an entire schedule in a single scene.
How it works
In the trigger, you add as many time slots as you want (a start time, an end
time) and you choose the days of the week concerned. The scene is executed at the start and end of each time slot.
Then, you add the action « Time Slot Schedule » in an « If… Then… Else »
block:
Then → we are in a time slot: you turn it on
Else → we are outside: you turn it off
One scene, one device, and the schedule you want.
Recovery after a power outage. That’s the feature I find the most useful.
Tasks are scheduled for the future only: if Gladys is stopped at the moment a
slot starts or ends, that moment is never caught up. In practice, a pool pump
cut off by a power outage would stay off until the end of the slot — or worse,
a pump left on would keep running long after the end.
There is therefore a box « Re-evaluate on startup ». If checked, the scene is
run once at Gladys startup with the actual state of the schedule (in a slot or
not), and it’s the scene that puts the device back in the correct state. Gladys
doesn’t know which device you are controlling: rather than guessing, it gives
you back control.
Usage examples
Pool pump: several time slots during the day, different in summer and
winter, and the state is correctly restored after a power outage
Heating: 06:00 → 08:30 and 18:00 → 23:00 on weekdays, longer slot on
the weekend
Outdoor lighting: 22:00 → 06:00, a slot that crosses midnight