-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdevice.go
27 lines (24 loc) · 1010 Bytes
/
device.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package natureremo
import "time"
// Device represents a device such as Nature Remo and Nature Remo Mini.
type Device struct {
DeviceCore
// NewestEvents is newest sensor values such as temperature, humidity and illumination.
NewestEvents map[SensorType]SensorValue `json:"newest_events"`
}
// DeviceCore represents core information of a device.
type DeviceCore struct {
ID string `json:"id"`
Name string `json:"name"`
TemperatureOffset int64 `json:"temperature_offset"`
HumidityOffset int64 `json:"humidity_offset"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
FirmwareVersion string `json:"firmware_version"`
MacAddress string `json:"mac_address"`
// Not in swagger, but actually included in the response
BtMacAddress string `json:"bt_mac_address"`
SerialNumber string `json:"serial_number"`
// Not in swagger, but actually included in the response
Users []User `json:"users"`
}