1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Make it possible to restart core in safe mode (#102606)

This commit is contained in:
Erik Montnemery
2023-10-24 14:47:58 +02:00
committed by GitHub
parent 46322a0f59
commit 97cc05d0b4
14 changed files with 170 additions and 11 deletions

View File

@@ -188,7 +188,7 @@ async def _async_get_custom_components(
hass: HomeAssistant,
) -> dict[str, Integration]:
"""Return list of custom integrations."""
if hass.config.recovery_mode:
if hass.config.recovery_mode or hass.config.safe_mode:
return {}
try:
@@ -1179,7 +1179,7 @@ def _async_mount_config_dir(hass: HomeAssistant) -> None:
def _lookup_path(hass: HomeAssistant) -> list[str]:
"""Return the lookup paths for legacy lookups."""
if hass.config.recovery_mode:
if hass.config.recovery_mode or hass.config.safe_mode:
return [PACKAGE_BUILTIN]
return [PACKAGE_CUSTOM_COMPONENTS, PACKAGE_BUILTIN]