mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Install deps and reqs early for config flows (#23169)
This commit is contained in:
parent
3d85999258
commit
6a40a712cd
@ -706,6 +706,10 @@ class ConfigEntries:
|
|||||||
_LOGGER.error('Cannot find integration %s', handler_key)
|
_LOGGER.error('Cannot find integration %s', handler_key)
|
||||||
raise data_entry_flow.UnknownHandler
|
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:
|
try:
|
||||||
integration.get_component()
|
integration.get_component()
|
||||||
except ImportError as err:
|
except ImportError as err:
|
||||||
@ -721,10 +725,6 @@ class ConfigEntries:
|
|||||||
|
|
||||||
source = context['source']
|
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.
|
# Create notification.
|
||||||
if source in DISCOVERY_SOURCES:
|
if source in DISCOVERY_SOURCES:
|
||||||
self.hass.bus.async_fire(EVENT_FLOW_DISCOVERED)
|
self.hass.bus.async_fire(EVENT_FLOW_DISCOVERED)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user