From d1463a81d38058d2c2692a7759ce5db77722df9e Mon Sep 17 00:00:00 2001 From: Christopher Fenner <9592452+CFenner@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:19:20 +0100 Subject: [PATCH] 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 --- homeassistant/components/vicare/climate.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/vicare/climate.py b/homeassistant/components/vicare/climate.py index a7a2fb7e277..c1e04e1d1b2 100644 --- a/homeassistant/components/vicare/climate.py +++ b/homeassistant/components/vicare/climate.py @@ -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() )