mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Handle CO2Signal response value being None (#54377)
This commit is contained in:
parent
3202d4882a
commit
934662cd54
@ -118,7 +118,8 @@ class CO2Sensor(update_coordinator.CoordinatorEntity[CO2SignalResponse], SensorE
|
||||
def available(self) -> bool:
|
||||
"""Return True if entity is available."""
|
||||
return (
|
||||
super().available and self._description.key in self.coordinator.data["data"]
|
||||
super().available
|
||||
and self.coordinator.data["data"].get(self._description.key) is not None
|
||||
)
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user