How can I use a smart button to cycle through input select options?

Hello,
I am fairly new to Home Assistant but have jumped in with both feet and have lots of devices now connected. I have philips hue bulbs in my living room and library and love them. I have purchased a xiaomi smart gateway and have purchased mi smart buttons to allow me to turn on and off various Hue lights through Home Assistant automations. What I would also like to do is use the double click feature of the mi smart buttons to cycle through Hue scenes. I have set up an input select for each light and linked this to automations to select the different hue scenes which is working well to select them from the HA front end. What I am trying to do is use the MI smart button to cycle through the scenes so on each double click it would move to the next input select I have created. Can anyone give any advice on how I might achieve this or if there is a better way I can use a smart button to cycle through hue scenes for a room?
Appreciate any advice anyone can give.
Leigh

Hi.

Did you manage to get this working?

Hello, I have the same setup. Here is the code for the automation.

- id: auto22
  alias: Bedroom key double click
  hide_entity: true
  trigger:
  - platform: event
    event_type: click
    event_data:
      entity_id: binary_sensor.switch_158dxxxxxxxxxx
      click_type: double
  action:
  - service: input_select.select_next
    entity_id: input_select.gateway_color_mode
  - service: light.turn_on
    entity_id:
    - light.bedroom_light
    data_template:
      color_name: '{{ states.input_select.gateway_color_mode.state }}'
      brightness: 255

This is the input slider for gateway_color_mode

input_select:
  gateway_color_mode:
    name: Color mode
    options:
      - darkviolet    
      - hotpink
      - gold
      - deepskyblue
      - springgreen
      - blue
      - red
    icon: mdi:format-color-fill
4 Likes