Page 1 of 1

Struggling with the Xiaomi Wireless Switch

Posted: Friday 31 March 2017 21:18
by quack3d
I have the Xiaomi Wireless Switch and I want one click to turn on a lamp at 30 % and second click to turn it off. Then I want double click to set the lamp to 60 % and one click to turn it off again. What's a good way to do that in Blockly? My beginning attempt turns the light on and off like it should, but from the logs I see that it's actually turning it on/off/on or off/on/off.

At the moment all the selector actions are empty and I have set Off delay to 1 second.
Domoticz (2).png
Domoticz (2).png (34.62 KiB) Viewed 1592 times

Re: Struggling with the Xiaomi Wireless Switch

Posted: Sunday 02 April 2017 22:29
by quack3d
I made it. Just had to switch the two Sets for some reason. Single click turns light to 30 % if light is off. If light is on it turns it off. Double click sets light to 60 % and long click sets it to 100 %.
Domoticz (3).png
Domoticz (3).png (67.78 KiB) Viewed 1552 times