Condensed and efficient way of switching between modes based on time of day and presence.
Add as many presence sensors / lights as you wish in the variables.
Change the time of day for each mode threshold in the variables.
- Home - Dawn
- Home - Day
- Home - Evening
- Home - Night
- Away - Dawn
- Away - Day
- Away - Night
Edit: Worked around a bug, had to change <= to < as webCoRE was ignoring the 20 second differential, incorrectly calculating ‘20 seconds past 5am’ as 05:00 <= 05:00 as true.
$time24 <= 05:00:00 (05:00:20 <= 05:00:00) returns true instead of false.
Would help if we had a variable for time now that formatted as hh:mm:ss instead of just hh:mm
This version will set SHM to Armed/Stay for ‘sleep’ mode