Location is optional for beverage_supply so make it omitempty
This commit is contained in:
parent
72f5a67989
commit
8015ed2be5
|
@ -46,6 +46,16 @@
|
||||||
"club-assistant"
|
"club-assistant"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"beverage_supply": [
|
||||||
|
{
|
||||||
|
"sensor_data": {
|
||||||
|
"unit": "btl"
|
||||||
|
},
|
||||||
|
"allowed_credentials": [
|
||||||
|
"club-assistant"
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"state": {
|
"state": {
|
||||||
|
|
|
@ -45,7 +45,7 @@ type SpaceState struct {
|
||||||
type EnvironmentSensor struct {
|
type EnvironmentSensor struct {
|
||||||
Value float64 `json:"value"`
|
Value float64 `json:"value"`
|
||||||
Unit string `json:"unit"`
|
Unit string `json:"unit"`
|
||||||
Location string `json:"location"`
|
Location string `json:"location,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Description string `json:"description,omitempty"`
|
Description string `json:"description,omitempty"`
|
||||||
LastChange int64 `json:"lastchange,omitempty"`
|
LastChange int64 `json:"lastchange,omitempty"`
|
||||||
|
@ -61,7 +61,7 @@ type PersistentStateV14 struct {
|
||||||
|
|
||||||
type PersistentEnvironmentSensor struct {
|
type PersistentEnvironmentSensor struct {
|
||||||
Value float64 `json:"value"`
|
Value float64 `json:"value"`
|
||||||
Location string `json:"location"`
|
Location string `json:"location,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
LastChange int64 `json:"lastchange"`
|
LastChange int64 `json:"lastchange"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue