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