Add fields for Temperature and Humidity sensors to SpaceAPIResponseV14

This commit is contained in:
Bendodroid 2024-01-13 23:13:56 +01:00
parent 951b4edc17
commit ab0a91d5f2
Signed by: bendodroid
GPG key ID: 3EEE19A0F73D5FFC

View file

@ -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"`