parent
74a8db7d2b
commit
68d0ec05db
4 changed files with 50 additions and 7 deletions
|
@ -89,9 +89,10 @@ func SaveCurrentState(response types.SpaceAPIResponseV14) {
|
|||
// Create persistent state
|
||||
persistentStateV14 := types.PersistentStateV14{
|
||||
State: struct {
|
||||
Open bool `json:"open"`
|
||||
LastChange int64 `json:"lastchange"`
|
||||
}{Open: response.State.Open, LastChange: response.State.LastChange},
|
||||
Open bool `json:"open"`
|
||||
LastChange int64 `json:"lastchange"`
|
||||
Message string `json:"message,omitempty"`
|
||||
}{Open: response.State.Open, LastChange: response.State.LastChange, Message: response.State.Message},
|
||||
}
|
||||
// Save sensor state
|
||||
persistentStateV14.Sensors = make(map[string][]types.PersistentEnvironmentSensor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue