prefer total_seconds over seconds (#49505)

This commit is contained in:
Paulus Schoutsen 2021-04-20 17:41:36 -07:00 committed by GitHub
parent 020d456889
commit a90d3a051f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 65 additions and 46 deletions

View file

@ -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)