Skip to content

Commit cb01137

Browse files
Fixed 'Detected I/O inside the event loop' on update
1 parent cac83f8 commit cb01137

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom_components/panasonic_cc/panasonic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ async def do_update(self):
4646
data= await self.hass.async_add_executor_job(self._api.get_device,self.id)
4747
except:
4848
_LOGGER.debug("Error trying to get device {id} state, probably expired token, trying to update it...".format(**self.device))
49-
self._api.login()
50-
data = self._api.get_device(self.id)
49+
await self.hass.async_add_executor_job(self._api.login)
50+
data= await self.hass.async_add_executor_job(self._api.get_device,self.id)
5151

5252
if data is None:
5353
self._available = False

0 commit comments

Comments
 (0)