Automation help! single button, multiple devices

Hi

ive just got a lovely little smart home scene button off the aliexpress - it has a rotating bit + a button.
i want to use it to control 3 different entities without needing three buttons.
light.attic
light.attic.den
light.attic.eaves

i was hoping to have the ‘single press’ button to be able to switch between these 3 different ‘active’ entities, and the rotating bit to inc/dec those entities individually

how would i go about doing this?

i could create automations for ‘inc/dec brightness’ of ‘$dummy’ (?by editing the automations.yaml) using rotation, and then set the button press to swap the value of $dummy - but how/where to do this?

any help would be appreciated!

  1. create an “dropdown” helper (aka input_select), put the names of the 3 entities as the 3 different options (btw, are those names you listed correct? you have light.attic.den, i didn’t think you could have a . in the entity name after light.)

  2. create an automation for the dial, you’ll call light.turn_on with brightness_step or brightness_step_pct and for the target, use whatever is in the input_select from #1 above.

  3. create an automation for the button. each press call input_select.select_next which will cycle through the 3 choices.

1 Like

Something like this:-

      - service: input_select.select_next
        data:
          cycle: true
        target:
          entity_id: input_select.kitchen_scenes_list
      - service: scene.turn_on
        target:
          entity_id: "{{ states('input_select.kitchen_scenes_list') }}"
        metadata: {}

As the action, with the trigger being the turn of the dial or a simple button press.

I use this on a simple button press event to toggle through different lighting scenes in my kitchen. Setup the scene names as an input select helper as @armedad has mentioned, this is mine:-

2 Likes

Thanks for this - it was the missing bit!
I did the above - made a list with the helper and added the entities I wanted.
i then made an automation ‘rotate right’ - action: light on and selected one of the lights i wanted to use, clicked ‘alter brightness by step of 10’ then went to yaml and deleted the device_id and replaced it with ‘entity_id:’ and put in the bit with the states!

works wonders.

thanks guys