From a81026ea90eacde55f035cc909d67cdf9b7875a3 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 7 Dec 2021 23:14:21 -0800 Subject: [PATCH] Fix follow-up review comment for bbox (#61219) --- homeassistant/components/bbox/sensor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/bbox/sensor.py b/homeassistant/components/bbox/sensor.py index 129803ad1e1..fc9c8982733 100644 --- a/homeassistant/components/bbox/sensor.py +++ b/homeassistant/components/bbox/sensor.py @@ -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):