Basic IKEA tradfri light driver

This commit is contained in:
Stian Fredrik Aune
2022-12-30 19:17:22 +01:00
parent edbc576eed
commit 958b09e659
6 changed files with 484 additions and 10 deletions
+3 -2
View File
@@ -7,11 +7,12 @@ import (
)
type PairDevice struct {
ID string `json:"id"`
ID string `json:"id"`
APIKey string `json:"apiKey"`
}
func (c PairDevice) CommandDescription() string {
return fmt.Sprintf("PairDevice(%s)", c.ID)
return fmt.Sprintf("PairDevice(%s, %s)", c.ID, formattools.Asterisks(c.APIKey))
}
func (c PairDevice) Matches(driver string) (sub string, ok bool) {