Fix async issue in ViCare climate entity (#104619)
* use async executor * use async executor * Revert "use async executor" This reverts commitpull/104632/head4913e05b1c
. * Revert "use async executor" This reverts commit40abc10362
. * fix async issue
parent
f149c809c2
commit
d1463a81d3
|
@ -155,7 +155,7 @@ class ViCareClimate(ViCareEntity, ClimateEntity):
|
|||
self._current_program = None
|
||||
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."""
|
||||
try:
|
||||
_room_temperature = None
|
||||
|
@ -206,15 +206,11 @@ class ViCareClimate(ViCareEntity, ClimateEntity):
|
|||
self._current_action = False
|
||||
# Update the specific device attributes
|
||||
with suppress(PyViCareNotSupportedFeatureError):
|
||||
burners = await self.hass.async_add_executor_job(get_burners, self._api)
|
||||
for burner in burners:
|
||||
for burner in get_burners(self._api):
|
||||
self._current_action = self._current_action or burner.getActive()
|
||||
|
||||
with suppress(PyViCareNotSupportedFeatureError):
|
||||
compressors = await self.hass.async_add_executor_job(
|
||||
get_compressors, self._api
|
||||
)
|
||||
for compressor in compressors:
|
||||
for compressor in get_compressors(self._api):
|
||||
self._current_action = (
|
||||
self._current_action or compressor.getActive()
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue