mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Fix follow-up review comment for bbox (#61219)
This commit is contained in:
parent
1ca8df9584
commit
a81026ea90
@ -131,10 +131,9 @@ class BboxUptimeSensor(SensorEntity):
|
|||||||
def update(self):
|
def update(self):
|
||||||
"""Get the latest data from Bbox and update the state."""
|
"""Get the latest data from Bbox and update the state."""
|
||||||
self.bbox_data.update()
|
self.bbox_data.update()
|
||||||
uptime = utcnow() - timedelta(
|
self._attr_native_value = utcnow() - timedelta(
|
||||||
seconds=self.bbox_data.router_infos["device"]["uptime"]
|
seconds=self.bbox_data.router_infos["device"]["uptime"]
|
||||||
)
|
)
|
||||||
self._attr_native_value = uptime.replace(microsecond=0)
|
|
||||||
|
|
||||||
|
|
||||||
class BboxSensor(SensorEntity):
|
class BboxSensor(SensorEntity):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user