mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
Fix async issue in ViCare climate entity (#104619)
* use async executor * use async executor * Revert "use async executor" This reverts commit4913e05b1c
. * Revert "use async executor" This reverts commit40abc10362
. * fix async issue
This commit is contained in:
committed by
GitHub
parent
f149c809c2
commit
d1463a81d3
@@ -155,7 +155,7 @@ class ViCareClimate(ViCareEntity, ClimateEntity):
|
|||||||
self._current_program = None
|
self._current_program = None
|
||||||
self._attr_translation_key = translation_key
|
self._attr_translation_key = translation_key
|
||||||
|
|
||||||
async def async_update(self) -> None:
|
def update(self) -> None:
|
||||||
"""Let HA know there has been an update from the ViCare API."""
|
"""Let HA know there has been an update from the ViCare API."""
|
||||||
try:
|
try:
|
||||||
_room_temperature = None
|
_room_temperature = None
|
||||||
@@ -206,15 +206,11 @@ class ViCareClimate(ViCareEntity, ClimateEntity):
|
|||||||
self._current_action = False
|
self._current_action = False
|
||||||
# Update the specific device attributes
|
# Update the specific device attributes
|
||||||
with suppress(PyViCareNotSupportedFeatureError):
|
with suppress(PyViCareNotSupportedFeatureError):
|
||||||
burners = await self.hass.async_add_executor_job(get_burners, self._api)
|
for burner in get_burners(self._api):
|
||||||
for burner in burners:
|
|
||||||
self._current_action = self._current_action or burner.getActive()
|
self._current_action = self._current_action or burner.getActive()
|
||||||
|
|
||||||
with suppress(PyViCareNotSupportedFeatureError):
|
with suppress(PyViCareNotSupportedFeatureError):
|
||||||
compressors = await self.hass.async_add_executor_job(
|
for compressor in get_compressors(self._api):
|
||||||
get_compressors, self._api
|
|
||||||
)
|
|
||||||
for compressor in compressors:
|
|
||||||
self._current_action = (
|
self._current_action = (
|
||||||
self._current_action or compressor.getActive()
|
self._current_action or compressor.getActive()
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user