From 6a40a712cdf41553354352bf98a1ca2895d4e412 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 17 Apr 2019 09:49:45 -0700 Subject: [PATCH] Install deps and reqs early for config flows (#23169) --- homeassistant/config_entries.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index 0cc36a9760b..393a046b5a2 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -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)