Xiaomi smart button to cycle through input select

I have installed a sonoff 4ch to control my 3 speed fan. To control it I have set up a script which ensures the other speed switches are off before selecting the desired speed. Whilst this is awesome as we all know my wife absolutely hates it and refuses to use alexa to turn it on or off. Thus the need for the smart button, I have 4 scripts one for high, medium, low and off. My question is the xiaomi button only has 3 different types of toggles\presses and I need 4. Can I set up an input selector and have the xiaomi button single click cycle through the speeds and off so I don’t need to deploy multiple buttons?

Sure, the is a select_next service call you can use, see input_select.

1 Like