Install deps and reqs early for config flows (#23169)

pull/22976/head
Paulus Schoutsen 2019-04-17 09:49:45 -07:00 committed by GitHub
parent 3d85999258
commit 6a40a712cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -706,6 +706,10 @@ class ConfigEntries:
_LOGGER.error('Cannot find integration %s', handler_key)
raise data_entry_flow.UnknownHandler
# Make sure requirements and dependencies of component are resolved
await async_process_deps_reqs(
self.hass, self._hass_config, integration)
try:
integration.get_component()
except ImportError as err:
@ -721,10 +725,6 @@ class ConfigEntries:
source = context['source']
# Make sure requirements and dependencies of component are resolved
await async_process_deps_reqs(
self.hass, self._hass_config, integration)
# Create notification.
if source in DISCOVERY_SOURCES:
self.hass.bus.async_fire(EVENT_FLOW_DISCOVERED)