mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fix async issue in ViCare climate entity (#104619)
* use async executor * use async executor * Revert "use async executor" This reverts commit 4913e05b1c6f6289018d55bcc8f16cf6391e4121. * Revert "use async executor" This reverts commit 40abc10362bc0910ebb9649e664d3daaeed939f5. * fix async issue
This commit is contained in:
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…
x
Reference in New Issue
Block a user