Add fields for Temperature and Humidity sensors to SpaceAPIResponseV14
This commit is contained in:
parent
951b4edc17
commit
ab0a91d5f2
12
types/v14.go
12
types/v14.go
|
@ -23,6 +23,10 @@ type SpaceAPIResponseV14 struct {
|
|||
ML string `json:"ml"`
|
||||
Matrix string `json:"matrix"`
|
||||
} `json:"contact"`
|
||||
Sensors struct {
|
||||
Temperature []EnvironmentSensor `json:"temperature"`
|
||||
Humidity []EnvironmentSensor `json:"humidity"`
|
||||
} `json:"sensors"`
|
||||
Feeds struct {
|
||||
Blog struct {
|
||||
Type string `json:"type"`
|
||||
|
@ -39,6 +43,14 @@ type SpaceAPIResponseV14 struct {
|
|||
} `json:"links"`
|
||||
}
|
||||
|
||||
type EnvironmentSensor struct {
|
||||
Value float32 `json:"value"`
|
||||
Unit string `json:"unit"`
|
||||
Location string `json:"location"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
type PersistentStateV14 struct {
|
||||
State struct {
|
||||
Open bool `json:"open"`
|
||||
|
|
Loading…
Reference in a new issue