More refactoring, moved kettle auto off out of the kettle implementation and into a seperate automation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-19 04:36:40 +01:00
parent 20e7e830a6
commit 5aefcf0157
13 changed files with 99 additions and 68 deletions

View File

@@ -9,8 +9,6 @@ import (
"google.golang.org/api/homegraph/v1"
"google.golang.org/api/option"
paho "github.com/eclipse/paho.mqtt.golang"
)
type Home struct {
@@ -21,7 +19,7 @@ type Home struct {
}
// Auto populate and update the device list
func New(username string, credentials config.Credentials, client paho.Client) *Home {
func New(username string, credentials config.Credentials) *Home {
home := &Home{Username: username, Devices: make(map[device.InternalName]device.Basic)}
homegraphService, err := homegraph.NewService(context.Background(), option.WithCredentialsJSON(credentials))