def _fire_manual_control_event(
    switch: AdaptiveSwitch,
    light: str,
    context: Context,
):
    """Fire an event that 'light' is marked as manual_control."""
    hass = switch.hass
    _LOGGER.debug(
        "'adaptive_lighting.manual_control' event fired for %s for light %s",
        switch.entity_id,
        light,
    )
    switch.manager.mark_as_manual_control(light)
    hass.bus.async_fire(
        f"{DOMAIN}.manual_control",
        {ATTR_ENTITY_ID: light, SWITCH_DOMAIN: switch.entity_id},
        context=context,
    )
Fire an event that 'light' is marked as manual_control.
custom_components/adaptive_lighting/switch.py