Change Sensors field type in config and response to map

This commit is contained in:
Bendodroid 2024-01-14 01:01:12 +01:00
parent c3f51f2e36
commit daac0b3b9e
Signed by: bendodroid
GPG key ID: 3EEE19A0F73D5FFC
2 changed files with 4 additions and 10 deletions

View file

@ -19,11 +19,8 @@ type EnvironmentSensorConfig struct {
}
type DynamicStateConfig struct {
Sensors struct {
Temperature []EnvironmentSensorConfig `json:"temperature"`
Humidity []EnvironmentSensorConfig `json:"humidity"`
} `json:"sensors"`
State struct {
Sensors map[string][]EnvironmentSensorConfig `json:"sensors"`
State struct {
Open struct {
AllowedCredentials []HTTPBACredentialID `json:"allowed_credentials"`
} `json:"open"`

View file

@ -23,11 +23,8 @@ 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 {
Sensors map[string][]EnvironmentSensor `json:"sensors"`
Feeds struct {
Blog struct {
Type string `json:"type"`
URL string `json:"url"`