Aqara Wireless Switch Rule stopped working


I’m facing an issue while using this Switch with the Xiaomi Gateway.
In the log viewer I can see that the buttons are detected correctly (short pressed etc.). Now I want this switch to toggle a Wifi Plug via a rule. This works fine and the rule is triggered correctly. After some hours it stopped working although I don’t changed anything. I still see the “triggered SHORT_PRESSED” in the log viewer but the rule isn’t executed.
Now I open the rule and save it again, so it’s reloaded and it’s working for some hours and the error occurs again. Somebody got a hint?

Post the rule please

rule "Wireless Switch"
    Channel "mihome:86sw2:7c49eb1d1a6d:158d0002bXXXXX:ch1" triggered SHORT_PRESSED or
    Channel "mihome:86sw2:7c49eb1d1a6d:158d0002bXXXXX:ch1" triggered DOUBLE_PRESSED
    logInfo("wirelesSwitch.rules", "links kurz")
    if (Bathroom_Sonos.state == ON){
        logInfo("wirelesSwitch.rules", "Ausgeschaltet")
    if(Bathroom_Sonos.state == OFF){
        logInfo("wirelesSwitch.rules", "Angeschaltet")


Weird, should be running …
Does something appear in the logs when the rules gets unloaded?

Sorry. But what do you mean by “gets unloaded”?

whenever it gets deactivated

No. The rule is not triggered anymore. I mean, I can’t see the first output to the log viewer which says “links kurz”. But I still can see that the key press is correctly recognised because in the log viewer it says:

Channel "mihome:86sw2:7c49eb1d1a6d:158d0002bXXXXX:ch1" triggered SHORT_PRESSED