fix bug when registering multiple listeners and change sunrise/sunset to non-ha impl

This commit is contained in:
Sam Lewis
2023-01-12 22:33:38 -05:00
parent a868c08d40
commit e58a75388e
10 changed files with 112 additions and 62 deletions

View File

@@ -3,13 +3,18 @@ package main
import (
"encoding/json"
"log"
"os"
"time"
ga "saml.dev/gome-assistant"
)
func main() {
app := ga.NewApp("0.0.0.0:8123") // Replace with your Home Assistant IP Address
app := ga.NewApp(ga.NewAppRequest{
IpAddress: "192.168.86.67", // Replace with your Home Assistant IP Address
HAAuthToken: os.Getenv("HA_AUTH_TOKEN"),
HomeZoneEntityId: "zone.home",
})
defer app.Cleanup()
pantryDoor := ga.