prefer total_seconds over seconds (#49505)
This commit is contained in:
parent
020d456889
commit
a90d3a051f
31 changed files with 65 additions and 46 deletions
|
@ -120,7 +120,7 @@ class MQTTRoomSensor(SensorEntity):
|
|||
if (
|
||||
device.get(ATTR_ROOM) == self._state
|
||||
or device.get(ATTR_DISTANCE) < self._distance
|
||||
or timediff.seconds >= self._timeout
|
||||
or timediff.total_seconds() >= self._timeout
|
||||
):
|
||||
update_state(**device)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue