go.charczuk.com@v0.0.0-20240327042549-bc490516bd1a/experiments/huectl/pkg/hue/sensor.go (about) 1 /* 2 3 Copyright (c) 2023 - Present. Will Charczuk. All rights reserved. 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file at the root of the repository. 5 6 */ 7 8 package hue 9 10 // Sensor represents a bridge sensor https://developers.meethue.com/documentation/sensors-api 11 type Sensor struct { 12 State map[string]interface{} `json:"state,omitempty"` 13 Config map[string]interface{} `json:"config,omitempty"` 14 Name string `json:"name,omitempty"` 15 Type string `json:"type,omitempty"` 16 ModelID string `json:"modelid,omitempty"` 17 ManufacturerName string `json:"manufacturername,omitempty"` 18 UniqueID string `json:"uniqueid,omitempty"` 19 SwVersion string `json:"swversion,omitempty"` 20 ID int `json:",omitempty"` 21 } 22 23 // Sensors defines a list of sensors discovered the last time the bridge performed a sensor discovery. 24 // Also stores the timestamp the last time a discovery was performed. 25 type Sensors struct { 26 Sensors []Sensor 27 LastScan string `json:"lastscan"` 28 }