Call coordinator.shutdown() when ConfigEntryNotReady (#42833)

pull/42837/head
Maciej Bieniek 2020-11-04 15:35:54 +01:00 committed by GitHub
parent 1fe66df962
commit 34f5ad33e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -34,6 +34,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
await coordinator.async_refresh()
if not coordinator.last_update_success:
coordinator.shutdown()
raise ConfigEntryNotReady
hass.data.setdefault(DOMAIN, {})