One button cycles through lights

Hi,

Is there a way to cycle through lights with only one button?

I have a Xiaomi button and 2 bulbs. What I would like to do is:
First button click: light 1 goes on
Second button click: light 2 also goes on, light 1 stays on
Third button click: both lights go off

Is this even possible? Regardless of button/light type?
Thanks,
FC

You can do that with automations. I think the easiest might be to create an input_select and have the button advance through the select’s options. Build automations tgriggering on the state of the input_select. Or you could have one automation that watches the input_select for state changes and use service_template to run a script/scene of your choice based on the input_select’s state.

Tanks, gotta digest this, since I am a beginner on home assistant :slight_smile:
But I’ll figure it out …

Until then if anyone has maybe examples of similar stuff, please post it.

This looks like a good place to start:

Get the lights to change based on your input select first. Once that works, add the automation to cycle through states based on clicks of your button.

1 Like

Thanks, looks like exactly what I need, I will do that!