Skip to content

Commit

Permalink
Use async_add_executor_job instead of async_add_job (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi authored Aug 13, 2024
1 parent 8b4db4f commit e878a2a
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 e878a2a

Please sign in to comment.