Ensure this only applies to persistent connections
This commit is contained in:
1 parent
0cadbb9931
commit
296c9cbfd3
3 files changed
+4
-4
No files matched your search
@@ -105,8 +105,8 @@ class BluettiBinarySensor(CoordinatorEntity, BinarySensorEntity):
|
|||||||
def _handle_coordinator_update(self) -> None:
|
def _handle_coordinator_update(self) -> None:
|
||||||
"""Handle updated data from the coordinator."""
|
"""Handle updated data from the coordinator."""
|
||||||
|
|
||||||
if not self.coordinator.client.is_connected:
|
if self.coordinator.persistent_conn and not self.coordinator.client.is_connected:
|
||||||
return
|
return
|
||||||
|
|
||||||
_LOGGER.debug("Updating state of %s", unique_id_loggable(self._attr_unique_id))
|
_LOGGER.debug("Updating state of %s", unique_id_loggable(self._attr_unique_id))
|
||||||
if not isinstance(self.coordinator.data, dict):
|
if not isinstance(self.coordinator.data, dict):
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class BluettiSensor(CoordinatorEntity, SensorEntity):
|
|||||||
def _handle_coordinator_update(self) -> None:
|
def _handle_coordinator_update(self) -> None:
|
||||||
"""Handle updated data from the coordinator."""
|
"""Handle updated data from the coordinator."""
|
||||||
|
|
||||||
if not self.coordinator.client.is_connected:
|
if self.coordinator.persistent_conn and not self.coordinator.client.is_connected:
|
||||||
return
|
return
|
||||||
|
|
||||||
_LOGGER.debug("Updating state of %s", unique_id_loggable(self._attr_unique_id))
|
_LOGGER.debug("Updating state of %s", unique_id_loggable(self._attr_unique_id))
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ class BluettiSwitch(CoordinatorEntity, SwitchEntity):
|
|||||||
def _handle_coordinator_update(self) -> None:
|
def _handle_coordinator_update(self) -> None:
|
||||||
"""Handle updated data from the coordinator."""
|
"""Handle updated data from the coordinator."""
|
||||||
|
|
||||||
if not self.coordinator.client.is_connected:
|
if self.coordinator.persistent_conn and not self.coordinator.client.is_connected:
|
||||||
return
|
return
|
||||||
|
|
||||||
_LOGGER.debug("Updating state of %s", unique_id_loggable(self._attr_unique_id))
|
_LOGGER.debug("Updating state of %s", unique_id_loggable(self._attr_unique_id))
|
||||||
|
|||||||
Reference in new issue
Block a user