How do I cycle through scenes/ entities/ devices correctly using IKEA Styrbar blueprint?

Home Assistant 2023.1.5 full hassOS image on Proxmox

Hello everyone,

This is my first post. I recently installed Home Asisstant and so far managed to set up my Shellys for the blinds and Zigbee2MQTT with the Sonoff USB Dongle. I also integrated the first lights and switches.

Currently I’m trying to configure my IKEA Styrbar the following way:

  • First up button short press: Turn on scene.wz_stehleuchten_warmweiss (living_room_floor_lamps_warm_white)

  • Next up button short press: Turn on scene.wz_stehleuchten_kaltweiss (living_room_floor_lamps_cold_white)

  • Next up button short press: Turn on scene.wz_deckenleuchte (living_room_ceiling_lamp)

And then with every further short button press cycle through the scenes.

I have set this up using the epmatt Styrbar blueprint and also configured the helper_last_controller_event and the input_select helper as shown in this video by Smart Home Junkie.

What happens is this:

  • First up button short press: Nothing

  • Next up button short press: scene.wz_stehleuchten_kaltweiss is activated

  • Next up button short press: scene.wz_deckenleuchte is activated ADDITIONALLY.

  • Next up button short press: Nothing

Three problems:

  • First scene does not activate on initial up button short press

  • The scenes get activated additionally to the last scene activated, they accumulate. But I want only one scene activated at a time.

  • After the third button press, instead of starting the cycle over again, nothing happens and all scenes stay activated (but maybe something happens and I do not realize this as all scenes are activated, anyway).

This is how it looks like what I’ve set up:

The automation using the blueprint:

alias: Copy
description: ""
use_blueprint:
  path: EPMatt/ikea_e2001_e2002.yaml
  input:
    integration: Zigbee2MQTT
    controller_entity: sensor.wz_remote_action
    action_button_up_short:
      - service: input_select.select_next
        data:
          cycle: true
        target:
          entity_id: input_select.wz_scene_helper
      - service: scene.turn_on
        target:
          entity_id: "{{ states('input_select.wz_scene_helper')}}"
    action_button_up_long:
      - service: input_number.increment
        data: {}
        target:
          entity_id: input_number.wz_stehleuchten_brightness_helper
    action_button_down_short:
      - type: turn_off
        device_id: 7e970954e50a562715a8ea8f15ddc943
        entity_id: light.wz_stehleuchten
        domain: light
      - type: turn_off
        device_id: 7e15e12c2a6d40d1eaaed927ce6ffb9e
        entity_id: light.wz_deckenleuchte_2
        domain: light
    helper_last_controller_event: input_text.wz_remote_last_action_helper
    button_up_long_loop: true
    button_down_long_loop: true
    button_up_long_max_loop_repeats: 100
    button_right_long_max_loop_repeats: 100
    action_button_down_long:
      - service: input_number.decrement
        data: {}
        target:
          entity_id: input_number.wz_stehleuchten_brightness_helper

The last controller event helper:

As a new user, I can only post one media item…

The scene helper:

I’m pretty sure I forgot something that is needed to solve the problem. Please tell me what else is needed.

Thanks a lot for your support!

Marvin