Save sensor values to persistent-state.json

This commit is contained in:
Bendodroid 2024-01-14 01:29:41 +01:00
commit 44143c0c2d
Signed by: bendodroid
GPG key ID: 3EEE19A0F73D5FFC
2 changed files with 41 additions and 4 deletions

View file

@ -54,4 +54,12 @@ type PersistentStateV14 struct {
Open bool `json:"open"`
LastChange int64 `json:"lastchange"`
} `json:"state"`
Sensors map[string][]PersistentEnvironmentSensor `json:"sensors"`
}
type PersistentEnvironmentSensor struct {
Value float64 `json:"value"`
Location string `json:"location"`
Name string `json:"name"`
LastChange int64 `json:"lastchange"`
}