Skip to content

Commit

Permalink
Fix blocking call in Xiaomi Miio integration (home-assistant#126871)
Browse files Browse the repository at this point in the history
  • Loading branch information
tr4nt0r authored and zxdavb committed Sep 27, 2024
1 parent 6f2252c commit 8187bfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion homeassistant/components/xiaomi_miio/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ async def async_step_cloud(
step_id="cloud", data_schema=DEVICE_CLOUD_CONFIG, errors=errors
)

miio_cloud = MiCloud(cloud_username, cloud_password)
miio_cloud = await self.hass.async_add_executor_job(
MiCloud, cloud_username, cloud_password
)
try:
if not await self.hass.async_add_executor_job(miio_cloud.login):
errors["base"] = "cloud_login_error"
Expand Down

0 comments on commit 8187bfd

Please sign in to comment.