@callback
def add_to_platform_start(self, hass: HomeAssistant, platform: EntityPlatform, parallel_updates: (asyncio.Semaphore | None)) -> None:
    'Start adding an entity to a platform.'
    if (self._platform_state == EntityPlatformState.ADDED):
        raise HomeAssistantError(f'Entity {self.entity_id} cannot be added a second time to an entity platform')
    self.hass = hass
    self.platform = platform
    self.parallel_updates = parallel_updates
    self._platform_state = EntityPlatformState.ADDED
Start adding an entity to a platform.
@callback
def add_to_platform_start(self, hass: HomeAssistant, platform: EntityPlatform, parallel_updates: (asyncio.Semaphore | None)) -> None:
    
    if (self._platform_state == EntityPlatformState.ADDED):
        raise HomeAssistantError(f'Entity {self.entity_id} cannot be added a second time to an entity platform')
    self.hass = hass
    self.platform = platform
    self.parallel_updates = parallel_updates
    self._platform_state = EntityPlatformState.ADDED