Aqara wall switch, long and double-press

Why only first rule is working? Aqara switches doesn’t support long and double press?

rule "Xiaomi Aqara Battery Powered 1 Button Switch Lazienka"
when
    Channel "mihome:86sw1:7811dcb8e55f:158d000212ef0d:ch1" triggered SHORT_PRESSED
then
    logInfo("Xiaomi.Rules","Wall switch pressed (łazienka)") 
	if (sonoff_lazienka_sufit.state == ON)
	{
		sendCommand(sonoff_lazienka_sufit, OFF)
	}
	else {
		sendCommand(sonoff_lazienka_sufit, ON)
	}	 
	
end




rule "Xiaomi Aqara Battery Powered 1 Button Switch Lazienka"
when
    Channel "mihome:86sw1:7811dcb8e55f:158d000212ef0d:ch1" triggered LONG_PRESSED
then
    logInfo("Xiaomi.Rules","Wall switch long-pressed (łazienka)") 
	if (sonoff_lazienka_sufit.state == ON)
	{
		sendCommand(sonoff_lazienka_sufit, OFF)
	}
	else {
		sendCommand(sonoff_lazienka_sufit, ON)
	}	 
	
end



rule "Xiaomi Aqara Battery Powered 1 Button Switch Lazienka"
when
    Channel "mihome:86sw1:7811dcb8e55f:158d000212ef0d:ch1" triggered DOUBLE_PRESSED
then
    logInfo("Xiaomi.Rules","Wall switch double-pressed (łazienka)") 
	if (sonoff_lazienka_sufit.state == ON)
	{
		sendCommand(sonoff_lazienka_sufit, OFF)
	}
	else {
		sendCommand(sonoff_lazienka_sufit, ON)
	}	 
	
end

Unfortunately no

I have “two button” version too. I can set rule for left or for right button. Is there support for other events? Like “both button pressed”, or “long button pressed”?

Hi,

I have Aquara Wall Switch and I’ve been trying to read Channel event as you described, @talib, as follows:
lighting.rules:

rule "Xiaomi Test"
when
	Channel "mihome:ctrl_ln2:158d0002f9cb05:ch1" triggered
then
	logInfo("lighting.rules","Wall switch pressed (łazienka)")
	logInfo("lighting.rules","Wall switch event: " + receivedEvent.toString())
end

main.items:

`Switch Bathroom_Switch_Left "Podswietlenie Lustra" <wallswitch> { channel="mihome:ctrl_ln2:158d0002f9cb05:ch1" }`

The result of above code is none - no logs whatsoever. I wonder how did you managed to get your Wall Switch working like this. So far I can only listen to state changes of this device.

An Aquara Wireless Controll works fine.

Edit: Looking at your channel “mihome:86sw1:7811dcb8e55f:158d000212ef0d:ch1” I assume, that you are actually talking about Aquara Wireless Switch, not Aquara Wall Switch. The “86sw1” indicates that.

any update ?