Skip to content

Commit

Permalink
fix(hass): 🐛 ensure sensor attributes are correctly marshaled
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed Jun 19, 2024
1 parent 5083b43 commit ec6fe29
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/hass/sensor/sensor.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ type Details interface {
}

type stateUpdateRequest struct {
StateAttributes any `json:"attributes,omitempty"`
State any `json:"state"`
Icon string `json:"icon,omitempty"`
Type string `json:"type"`
UniqueID string `json:"unique_id"`
StateAttributes map[string]any `json:"attributes,omitempty"`
State any `json:"state"`
Icon string `json:"icon,omitempty"`
Type string `json:"type"`
UniqueID string `json:"unique_id"`
}

func newStateUpdateRequest(sensor State) *stateUpdateRequest {
Expand Down

0 comments on commit ec6fe29

Please sign in to comment.