async def async_internal_added_to_hass(self) -> None:
    'Run when entity about to be added to hass.\n\n        Not to be extended by integrations.\n        '
    if self.platform:
        info = {'domain': self.platform.platform_name}
        if self.platform.config_entry:
            info['source'] = SOURCE_CONFIG_ENTRY
            info['config_entry'] = self.platform.config_entry.entry_id
        else:
            info['source'] = SOURCE_PLATFORM_CONFIG
        self.hass.data.setdefault(DATA_ENTITY_SOURCE, {})[self.entity_id] = info
    if (self.registry_entry is not None):
        assert (not self.registry_entry.disabled_by), f"Entity {self.entity_id} is being added while it's disabled"
        self.async_on_remove(async_track_entity_registry_updated_event(self.hass, self.entity_id, self._async_registry_updated))
Run when entity about to be added to hass.

Not to be extended by integrations.
async def async_internal_added_to_hass(self) -> None:
    'Run when entity about to be added to hass.\n\n        Not to be extended by integrations.\n        '
    if self.platform:
        info = {'domain': self.platform.platform_name}
        if self.platform.config_entry:
            info['source'] = SOURCE_CONFIG_ENTRY
            info['config_entry'] = self.platform.config_entry.entry_id
        else:
            info['source'] = SOURCE_PLATFORM_CONFIG
        self.hass.data.setdefault(DATA_ENTITY_SOURCE, {})[self.entity_id] = info
    if (self.registry_entry is not None):
        assert (not self.registry_entry.disabled_by), f"Entity {self.entity_id} is being added while it's disabled"
        self.async_on_remove(async_track_entity_registry_updated_event(self.hass, self.entity_id, self._async_registry_updated))