In line with UI6/UI7, I’m moving all my scenes and PLEG logic to understand these 4 states.
I’m excited for making this change as it allows a low light level for the bedtime state.
- My question is, what do you do with “state” of the time of day? Are there other states that folks should use?
- Do you use PLEG state variables vs using sample virtual switches logic as I’ve shown below?
Thanks in advance for any ideas.
PS - I’ve accomplished this via the following PLEG logic:
Away_Switch Activated - Away Mode is set to away
Bedtime_Switch Activated - Bedtime Mode is turned on
Night_Switch Activated - Night Mode indicates Night time.
Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay
Weekday Weekly 00:00:00 1,2,3,4,5 None Weekly 23:59:59 1,2,3,4,5 None
Weekend Weekly 00:00:00 6,7 None Weekly 23:59:59 6,7 None
Time1159p Weekly 23:59:00 1,2,3,4,5,6,7 None None None
Time1259a Weekly 00:59:00 1,2,3,4,5,6,7 None None None
Wakeup_Alarm Weekly 07:00:00 1,2,3,4,5,6,7 None Interval 01:00:00 None
Sunset_Plus30 Weekly +00:30:00t 1,2,3,4,5,6,7 None None None
Name Repeat Expression
Day No !Night_Switch and !Bedtime_Switch
Night No Night_Switch and !Bedtime_Switch
Dark No Sunset_Plus30
Bedtime No Night_Switch and Bedtime_Switch
Away No Away_Switch
Wakeup_Weekday No Weekday and !Away and Wakeup_Alarm
Wakeup_Weekend No Weekend and !Away and Wakeup_Alarm
TV_Auto_Off No Time1259a
Goodnight_Auto_Off No Time1159p and !Bedtime
I’ve attached the dashboard of the Day Night Plugin with Virtual Switches that make up the day/night/bedtime/away logic too. I use Nest for my Home/Away switch…but you could use a Virtual Switch.