Skip to content

Commit

Permalink
test(sensors): update tests for sensors state
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed Jun 19, 2023
1 parent 319a8fc commit 7e2b48b
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 448 deletions.
6 changes: 5 additions & 1 deletion internal/sensors/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ func (s *sensorState) State() interface{} {
}

func (s *sensorState) Attributes() interface{} {
return s.data.Attributes()
if s.data.Attributes() != nil {
return s.data.Attributes()
} else {
return ""
}
}

func (s *sensorState) ID() string {
Expand Down
Loading

0 comments on commit 7e2b48b

Please sign in to comment.