Sonoff ZBMINI-L2 (Zigbee version) with Smart Bulb (Zigbee)

I managed to solve it by creating a blueprint.

How it works:

  • Wall Switch Toggled: When you flip the wall switch, the relay momentarily cuts power to the bulb.
  • Automation Reacts:
    • Immediately turns the relay back on to restore power to the bulb.
    • Waits until the bulb reconnects to Home Assistant (usually a few seconds).
    • Toggles the bulb’s state (turns it on if it was off, or off if it was on).
  • Result: You can use the wall switch to toggle the smart bulb on and off, and still control the bulb via the Home Assistant app, without manual wiring changes or special switch hardware.

Here is the blueprint, you can create an automation for each room now by simply selecting the wall switch and smart bulb that are connected.

blueprint:
  name: Smart Bulb Control with Non-Decoupled Switch
  description: Control a smart bulb with a wall switch that can't be decoupled
  domain: automation
  input:
    wall_switch_relay:
      name: Wall Switch Relay
      selector:
        entity:
          domain: switch
    smart_bulb:
      name: Smart Bulb
      selector:
        entity:
          domain: light
variables:
  wall_switch_relay: !input wall_switch_relay
  smart_bulb: !input smart_bulb
trigger:
  - platform: state
    entity_id: !input wall_switch_relay
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: !input wall_switch_relay
            state: "off"
        sequence:
          - service: switch.turn_on
            target:
              entity_id: !input wall_switch_relay
          - delay: "00:00:01"
          - service: light.toggle
            target:
              entity_id: !input smart_bulb