INNER CODE UNIT · Python
_async_registry_updated
jseidl/magic-areas · custom_components/magic_areas/__init__.py:49
async def _async_registry_updated(
event: (
Event[EventEntityRegistryUpdatedData]
| Event[EventDeviceRegistryUpdatedData]
),
) -> None:
"""Reload integration when entity registry is updated."""
area_data: dict[str, Any] = dict(config_entry.data)
if config_entry.options:
area_data.update(config_entry.options)
# Check if disabled
if not area_data.get(
CONF_RELOAD_ON_REGISTRY_CHANGE, DEFAULT_RELOAD_ON_REGISTRY_CHANGE
):
_LOGGER.debug(
"%s: Auto-Reloading disabled for this area skipping...",