Added light sensor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-23 01:16:46 +01:00
parent 780f633c90
commit f13ee65ead
10 changed files with 193 additions and 21 deletions

View File

@@ -5,6 +5,7 @@ import (
"automation/integration/google"
"log"
"net/http"
"strings"
)
type computer struct {
@@ -49,9 +50,12 @@ func (c *computer) Sync() *google.Device {
DefaultNames: []string{
"Computer",
},
Name: c.GetID().Name(),
Name: strings.Title(c.GetID().Name()),
}
room := strings.Title(c.GetID().Room())
if len(room) > 1 {
device.RoomHint = room
}
device.RoomHint = c.GetID().Room()
return device
}