Hello I try to configurate xiaomi smart plug. for actions
my rule
rule “Mijia & Aqara Wireless Switch”
when
Channel “mihome:sensor_switch:7c49eb8xxx158d0001xxxx:button” triggered
then
var actionName = receivedEvent.getEvent()
switch(actionName) {
case “SHORT_PRESSED”: {
sendTelegram(“bot1”, “Нажал”)
}
case “DOUBLE_PRESSED”: {
all_home.sendCommand(ON)
}
}
end
In logs I see that button was pressed, but its no actions…
rule “Одно нажатие”
when
Channel “mihome:sensor_switch:158d0001xxx:button” triggered SHORT_PRESSED
then
Thread::sleep(30000)
nobody_home.sendCommand(ON)
end