commit before try switching to duration

This commit is contained in:
Sam Lewis
2022-10-11 01:44:53 -04:00
parent 7bcca889f9
commit 44678ae762
2 changed files with 28 additions and 21 deletions

View File

@@ -10,11 +10,10 @@ import (
func main() {
app := ga.App("192.168.86.67:8123")
defer app.Cleanup()
s := ga.ScheduleBuilder().Call(lightsOut).Daily().At(ga.Sunset.Subtract(ga.TimeOfDay(0, 30))).Build()
s := ga.ScheduleBuilder().Call(lightsOut).Daily().At(ga.Sunset().Subtract(ga.TimeOfDay(0, 30))).Build()
s2 := ga.ScheduleBuilder().Call(lightsOut).Every(time.Hour*4 + time.Minute*30).Offset(ga.TimeOfDay(1, 0)).Build()
app.RegisterSchedule(s2)
// err = app.Start()
app.Start()
simpleListener := ga.EntityListenerBuilder().
EntityId("light.lights").