Use HOMEASSISTANT_DOMAIN alias for core DOMAIN (#122760)

This commit is contained in:
epenet 2024-07-29 13:35:36 +02:00 committed by GitHub
parent 9ce7779bde
commit 07c7bb8b2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 70 additions and 59 deletions

View file

@ -11,7 +11,7 @@ from homeassistant.components.scene import (
)
from homeassistant.config import SCENE_CONFIG_PATH
from homeassistant.const import CONF_ID, SERVICE_RELOAD
from homeassistant.core import DOMAIN as HA_DOMAIN, HomeAssistant, callback
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant, callback
from homeassistant.helpers import config_validation as cv, entity_registry as er
from .const import ACTION_DELETE
@ -32,7 +32,9 @@ def async_setup(hass: HomeAssistant) -> bool:
ent_reg = er.async_get(hass)
entity_id = ent_reg.async_get_entity_id(DOMAIN, HA_DOMAIN, config_key)
entity_id = ent_reg.async_get_entity_id(
DOMAIN, HOMEASSISTANT_DOMAIN, config_key
)
if entity_id is None:
return