Skip to content

Commit

Permalink
Fixed 'Detected I/O inside the event loop' on update
Browse files Browse the repository at this point in the history
  • Loading branch information
sockless-coding committed May 29, 2020
1 parent cac83f8 commit cb01137
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/panasonic_cc/panasonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ async def do_update(self):
data= await self.hass.async_add_executor_job(self._api.get_device,self.id)
except:
_LOGGER.debug("Error trying to get device {id} state, probably expired token, trying to update it...".format(**self.device))
self._api.login()
data = self._api.get_device(self.id)
await self.hass.async_add_executor_job(self._api.login)
data= await self.hass.async_add_executor_job(self._api.get_device,self.id)

if data is None:
self._available = False
Expand Down

0 comments on commit cb01137

Please sign in to comment.