Xiaomi smart plug rules

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…

mihome:sensor_switch:158d000xxxxx:button triggered SHORT_PRESSED

solved rewtite rules

rule “Одно нажатие”
when
Channel “mihome:sensor_switch:158d0001xxx:button” triggered SHORT_PRESSED
then
Thread::sleep(30000)
nobody_home.sendCommand(ON)
end

That is a long thread sleep in the rule. You may want to see this topic and save yourself some headaches in the future. :wink: