Fix follow-up review comment for bbox (#61219)

pull/61241/head
Paulus Schoutsen 2021-12-07 23:14:21 -08:00 committed by GitHub
parent 1ca8df9584
commit a81026ea90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -131,10 +131,9 @@ class BboxUptimeSensor(SensorEntity):
def update(self):
"""Get the latest data from Bbox and update the state."""
self.bbox_data.update()
uptime = utcnow() - timedelta(
self._attr_native_value = utcnow() - timedelta(
seconds=self.bbox_data.router_infos["device"]["uptime"]
)
self._attr_native_value = uptime.replace(microsecond=0)
class BboxSensor(SensorEntity):