Allows my home wiz lights to be timed on and off according to a schedule.

Dependents:   heating

Files at this revision

API Documentation at this revision

Comitter:
andrewboyson
Date:
Wed Jun 09 09:23:54 2021 +0000
Parent:
6:09ca95ef1cdd
Commit message:
Changed WizSchedMinutesUtcToLocal function so that local midnight in summer is 00h00 rather than 24h00.

Changed in this revision

wiz/wiz-sched.c Show annotated file Show diff for this revision Revisions of this file
--- a/wiz/wiz-sched.c	Tue May 18 16:37:15 2021 +0000
+++ b/wiz/wiz-sched.c	Wed Jun 09 09:23:54 2021 +0000
@@ -50,7 +50,7 @@
 {
     if (isDst) minutes += TM_DST_OFFSET * 60;
     else       minutes += TM_STD_OFFSET * 60;
-    if (minutes > 1440) minutes -= 1440;
+    if (minutes >= 1440) minutes -= 1440;
     return minutes;
 }
 int WizSchedMinutesLocalToUtc(int minutes)