mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Fix module check in _async_get_flow_handler (#99509)
We should have been checking for the module in hass.data[DATA_COMPONENTS] and not hass.config.components as the check was ineffective if there were no existing integrations instances for the domain which is the case for discovery or when the integration is ignored
This commit is contained in:
@@ -1187,3 +1187,8 @@ def _lookup_path(hass: HomeAssistant) -> list[str]:
|
||||
if hass.config.safe_mode:
|
||||
return [PACKAGE_BUILTIN]
|
||||
return [PACKAGE_CUSTOM_COMPONENTS, PACKAGE_BUILTIN]
|
||||
|
||||
|
||||
def is_component_module_loaded(hass: HomeAssistant, module: str) -> bool:
|
||||
"""Test if a component module is loaded."""
|
||||
return module in hass.data[DATA_COMPONENTS]
|
||||
|
||||
Reference in New Issue
Block a user