Help Needed with Home Assistant Automation for WiZ Light Scene Setting

Hi everyone,

I’m having trouble with a Home Assistant automation for my WiZ light strip. The automation is supposed to control the light strip with different actions based on button presses, but the scene setting isn’t working as expected. Below is the code I’m using:

alias: Tasterautomatisierung Küche
description: Steuert die WiZ-Lichtleiste mit verschiedenen Aktionen.
trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_id: 00e882aea1904b2a1b0c93ab9f25eb1b
      command: single
  - platform: event
    event_type: zha_event
    event_data:
      device_id: 00e882aea1904b2a1b0c93ab9f25eb1b
      command: double
  - platform: event
    event_type: zha_event
    event_data:
      device_id: 00e882aea1904b2a1b0c93ab9f25eb1b
      command: hold
condition: []
action:
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ trigger.event.data.command == 'single' }}"
        sequence:
          - choose:
              - conditions:
                  - condition: state
                    entity_id: light.kuchenbeleuchtung
                    state: "on"
                sequence:
                  - service: light.turn_off
                    target:
                      entity_id: light.kuchenbeleuchtung
              - conditions:
                  - condition: state
                    entity_id: light.kuchenbeleuchtung
                    state: "off"
                sequence:
                  - service: light.turn_on
                    target:
                      entity_id: light.kuchenbeleuchtung
                    data:
                      brightness: 255
                      scene_id: 11  # Warmweiß (Scene ID 11)
      - conditions:
          - condition: template
            value_template: "{{ trigger.event.data.command == 'double' }}"

        sequence:
          - service: light.turn_on
            target:
              entity_id: light.kuchenbeleuchtung
            data:
              brightness: 255
              scene_id: 12  # Tageslicht (Scene ID 12)
      - conditions:
          - condition: template
            value_template: "{{ trigger.event.data.command == 'hold' }}"
        sequence:
          - service: light.turn_on
            target:
              entity_id: light.kuchenbeleuchtung
            data:
              brightness: 50
mode: single

I’ve tried various adjustments, but nothing seems to work. Any advice or suggestions would be greatly appreciated!

I prefer to respond in German whenever possible.

Thanks in advance!