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

@@ -1,6 +1,7 @@
package kasa
import (
"automation/device"
"bytes"
"encoding/binary"
"encoding/json"
@@ -12,6 +13,9 @@ import (
// https://www.softscheck.com/en/blog/tp-link-reverse-engineering/
type Device interface {
device.Basic
IsKasaDevice()
GetIP() string
}

View File

@@ -17,6 +17,9 @@ func NewOutlet(name device.InternalName, ip string) *Outlet {
// kasa.Device
var _ Device = (*Outlet)(nil)
func (*Outlet) IsKasaDevice() {}
// kasa.Device
func (o *Outlet) GetIP() string {
return o.ip
}