I am trying to program the below scenario which in essence fires a different output every time a button is pressed, in a loop - the purpose is for scene selection with a Shelly device.
Button press 1 (this is a shelly button press) = Scene 1
Button press 2 = scene 2
3 = scene 3
4 = scene 4
loop returns to the top and the next button press = Scene 1
The idea is that node red holds the logic and record as to which scene was selected last. I am not overly concerned about reboots etc, just need this logic.
The shelly device sends an MQTT command which is the same trigger each time. What this trigger needs to do is ramp up / step through outputs that are then connected to actions/light outputs.
I need to create a way to recall a scene (or whatever it may be) and store this.