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
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user