Know how many times a button is pressed

Hi all,
I have a Fibaro switch FGS223, where I control 2 kind of light:

  • Swith 1: Simple switch light (on or off)

  • Switch 2: Configured as Button (In fibaro operating mode set as Auto-off) this because it’s connected to a Relay that has 4 positions: off -> all lights -> half right lights -> half left lights, and then repeat the cycle.

All is working good but I can’t know obviously the real state of the switch 2:
So now I would like to know the state of the switch 2, may be putting a counter inside a rule? This to know if the lights in which state are. Or is there any other solution? May be a counter isn’t exact because if the openhab is down the rule isn’t triggered.

You should try to get the state of the lights, not the state of the switch. :slight_smile:

1 Like

How?

As far as I understood, there are 5 association groups, where the 2nd and the 4th are switching channels for channel 1 and 2 just link these channels to two items and switch channel 1 through item 1 and channel 2 through item 2.