mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-06 01:15:10 -06:00
switched to time.Duration
This commit is contained in:
@@ -10,7 +10,7 @@ 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()).Build()
|
||||
s2 := ga.ScheduleBuilder().Call(lightsOut).Every(time.Hour*4 + time.Minute*30).Offset(ga.TimeOfDay(1, 0)).Build()
|
||||
app.RegisterSchedule(s2)
|
||||
app.Start()
|
||||
|
||||
Reference in New Issue
Block a user