Skip to content

Commit

Permalink
Use async_add_executor_job instead of async_add_job
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Aug 13, 2024
1 parent 8b4db4f commit 6c0566d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/xiaomi_miio_airpurifier/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -2416,7 +2416,7 @@ async def async_update(self):
return

try:
state = await self.hass.async_add_job(self._device.status)
state = await self.hass.async_add_executor_job(self._device.status)
_LOGGER.debug("Got new state: %s", state)

self._available = True
Expand Down Expand Up @@ -2632,7 +2632,7 @@ async def async_update(self):
return

try:
state = await self.hass.async_add_job(self._device.status)
state = await self.hass.async_add_executor_job(self._device.status)
_LOGGER.debug("Got new state: %s", state)

self._available = True
Expand Down Expand Up @@ -2771,7 +2771,7 @@ async def async_update(self):
return

try:
state = await self.hass.async_add_job(self._device.status)
state = await self.hass.async_add_executor_job(self._device.status)
_LOGGER.debug("Got new state: %s", state)

self._available = True
Expand Down Expand Up @@ -2910,7 +2910,7 @@ async def async_update(self):
return

try:
state = await self.hass.async_add_job(self._device.status)
state = await self.hass.async_add_executor_job(self._device.status)
_LOGGER.debug("Got new state: %s", state)

self._available = True
Expand Down

0 comments on commit 6c0566d

Please sign in to comment.