Count Button Pushes to perform different actions


#1

1) Give a description of the problem
I would like to control two lamps with one Xiaomi Zigbee Button

2) What is the expected behavior?
Single Press - Toggle Lamp A
Double Press - Toggle Lamp B
Tripple Press - Toggle Power socket

3) What is happening/not happening?
I cannot find a way to count the number of pushes in quick succession


#2

If button 1 is pushed
And
If button 1 is pushed

You can click and to change it to followed by


#3

Trying it now… is there any way to change the within 1 minute restriction?


#4

What about:

variable count = 0
If button pressed then count = count+1

Wait 5 seconds

With {count}
Case(1)
Toggle lamp a
Case (2)
Toggle lamp b
Case(3)
Toggle power socket
End with

Set count = 0

I know syntax is not right, but logic should work.


#5

You should be able to edit the time to whatever you want.


#6

Hi @adamrhoades.
Did you do anything with this in the end?
Be interested to see what you did.