From 5e64caa2258767dd78e4341450fd2c7003de3afe Mon Sep 17 00:00:00 2001 From: Simon Goodall Date: Mon, 30 Sep 2024 11:06:48 +0100 Subject: [PATCH] Check "status" is present before access during device update (#127091) --- homeassistant/components/hive/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/hive/sensor.py b/homeassistant/components/hive/sensor.py index 97f7a07237d..00a2116e268 100644 --- a/homeassistant/components/hive/sensor.py +++ b/homeassistant/components/hive/sensor.py @@ -127,5 +127,5 @@ class HiveSensorEntity(HiveEntity, SensorEntity): await self.hive.session.updateData(self.device) self.device = await self.hive.sensor.getSensor(self.device) self._attr_native_value = self.entity_description.fn( - self.device["status"]["state"] + self.device.get("status", {}).get("state") )