From ee781e4f494282fdfc0c6329a89f08f56bf1cbde Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 1 Mar 2023 03:58:47 +0100 Subject: [PATCH] Adjust registry access in scripts (#88884) --- homeassistant/scripts/check_config.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/homeassistant/scripts/check_config.py b/homeassistant/scripts/check_config.py index 85d0e77a4e3..92f5b442d9e 100644 --- a/homeassistant/scripts/check_config.py +++ b/homeassistant/scripts/check_config.py @@ -15,7 +15,11 @@ from homeassistant import core from homeassistant.config import get_default_config_dir from homeassistant.config_entries import ConfigEntries from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers import area_registry, device_registry, entity_registry +from homeassistant.helpers import ( + area_registry as ar, + device_registry as dr, + entity_registry as er, +) from homeassistant.helpers.check_config import async_check_ha_config_file from homeassistant.util.yaml import Secrets import homeassistant.util.yaml.loader as yaml_loader @@ -230,9 +234,9 @@ async def async_check_config(config_dir): hass = core.HomeAssistant() hass.config.config_dir = config_dir hass.config_entries = ConfigEntries(hass, {}) - await area_registry.async_load(hass) - await device_registry.async_load(hass) - await entity_registry.async_load(hass) + await ar.async_load(hass) + await dr.async_load(hass) + await er.async_load(hass) components = await async_check_ha_config_file(hass) await hass.async_stop(force=True) return components