mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-08 16:07:19 -06:00
renamed to example package to allow correct build
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
package main
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
@@ -15,7 +15,6 @@ func main() {
|
|||||||
HAAuthToken: os.Getenv("HA_AUTH_TOKEN"),
|
HAAuthToken: os.Getenv("HA_AUTH_TOKEN"),
|
||||||
HomeZoneEntityId: "zone.home",
|
HomeZoneEntityId: "zone.home",
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln("Error connecting to HASS:", err)
|
log.Fatalln("Error connecting to HASS:", err)
|
||||||
}
|
}
|
||||||
@@ -51,7 +50,6 @@ func main() {
|
|||||||
app.RegisterEventListeners(zwaveEventListener)
|
app.RegisterEventListeners(zwaveEventListener)
|
||||||
|
|
||||||
app.Start()
|
app.Start()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func pantryLights(service *ga.Service, state ga.State, sensor ga.EntityData) {
|
func pantryLights(service *ga.Service, state ga.State, sensor ga.EntityData) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package main
|
package example
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module main
|
module example
|
||||||
|
|
||||||
go 1.21.0
|
go 1.21.0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user