Skip to content

Commit

Permalink
Fetch device list asynchronously (Fixes #25)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersonshatch committed May 11, 2020
1 parent fdb4ac1 commit f71e955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/midea/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def async_setup_platform(hass, config, async_add_entities,
use_fan_only_workaround = config.get(CONF_USE_FAN_ONLY_WORKAROUND)

client = midea_client(app_key, username, password)
devices = client.devices()
devices = await hass.async_add_executor_job(client.devices)
entities = []
for device in devices:
if device.type == 0xAC:
Expand Down

0 comments on commit f71e955

Please sign in to comment.