Handle empty mylink response at startup (#46241)

This commit is contained in:
J. Nick Koston 2021-02-08 11:51:46 -10:00 committed by GitHub
parent fcae840641
commit c0a1fc2916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,6 +108,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
)
return False
if "result" not in mylink_status:
raise ConfigEntryNotReady("The Somfy MyLink device returned an empty result")
_async_migrate_entity_config(hass, entry, mylink_status)
undo_listener = entry.add_update_listener(_async_update_listener)