mirror of
https://github.com/nikdoof/hapz2m.git
synced 2026-01-30 13:58:17 +00:00
Z2M JSON exposes.values could be of numeric type
encoding/json would refuse to implicitly cast the numbers into strings. Currently we don't use these values, so let's preserve their type using `any` for now. An example is `keep_time` for occupancy sensors, where it's [30, 60, 120] seconds.
This commit is contained in:
2
z2m.go
2
z2m.go
@@ -354,7 +354,7 @@ type ExposesEntry struct {
|
|||||||
Features []ExposesEntry `json:"features"`
|
Features []ExposesEntry `json:"features"`
|
||||||
|
|
||||||
// values
|
// values
|
||||||
Values []string `json:"values"`
|
Values []any `json:"values"`
|
||||||
|
|
||||||
ValueOn any `json:"value_on"`
|
ValueOn any `json:"value_on"`
|
||||||
ValueOff any `json:"value_off"`
|
ValueOff any `json:"value_off"`
|
||||||
|
|||||||
Reference in New Issue
Block a user