Surepetcare, bug fix (#53695)

This commit is contained in:
Daniel Hjelseth Høyer
2021-07-29 16:59:02 +02:00
committed by GitHub
parent 705e2446e5
commit f8750daa09

View File

@@ -175,7 +175,7 @@ class DeviceConnectivity(SurePetcareBinarySensor):
"""Get the latest data and update the state."""
surepy_entity = self._spc.states[self._id]
state = surepy_entity.raw_data()["status"]
self._attr_is_on = self._attr_available = bool(self.state)
self._attr_is_on = self._attr_available = bool(state)
if state:
self._attr_extra_state_attributes = {
"device_rssi": f'{state["signal"]["device_rssi"]:.2f}',