Further integration load cleanups (#23104)

* Further integration load cleanups

* Fix tests

* Unflake MQTT vacuum command test
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2019-04-14 19:07:05 -07:00
1 parent 930f75220c
commit d722f4d64a
14 files changed
+160 -237

No files matched your search

+1 -2
View File
@@ -168,12 +168,11 @@ async def _async_setup_component(hass: core.HomeAssistant,
if result is not True:
log_error("Component {!r} did not return boolean if setup was "
"successful. Disabling component.".format(domain))
loader.set_component(hass, domain, None)
return False
if hass.config_entries:
for entry in hass.config_entries.async_entries(domain):
await entry.async_setup(hass, component=component)
await entry.async_setup(hass, integration=integration)
hass.config.components.add(component.DOMAIN) # type: ignore