Skip to content

Commit

Permalink
refactor(sensors): remove unnecessary code path
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed Jun 19, 2023
1 parent 791a3f2 commit 58cabe7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/sensors/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,7 @@ func (tracker *SensorTracker) add(s hass.SensorUpdate) error {
}
tracker.sensor[s.ID()] = state
tracker.mu.Unlock()
if tracker.exists(s.ID()) {
log.Debug().Caller().Msgf("Sensor: %s added (%s).", state.Name(), state.ID())
return nil
} else {
return errors.New("sensor was not added")
}
return nil
}

// Get fetches a sensors current tracked state
Expand Down

0 comments on commit 58cabe7

Please sign in to comment.