mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 22:25:13 +02:00
Check "status" is present before access during device update (#127091)
This commit is contained in:
@@ -127,5 +127,5 @@ class HiveSensorEntity(HiveEntity, SensorEntity):
|
|||||||
await self.hive.session.updateData(self.device)
|
await self.hive.session.updateData(self.device)
|
||||||
self.device = await self.hive.sensor.getSensor(self.device)
|
self.device = await self.hive.sensor.getSensor(self.device)
|
||||||
self._attr_native_value = self.entity_description.fn(
|
self._attr_native_value = self.entity_description.fn(
|
||||||
self.device["status"]["state"]
|
self.device.get("status", {}).get("state")
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user