Closed gobo-ws closed 2 years ago
Should be like this for a single_push event..
possible events: single_push, double_push, long_push, btn_up, btn_down
Shelly.addEventHandler(
function (event) {
if (typeof event.info.event !== 'undefined') {
if (event.info.event === 'single_push' && event.info.id === CONFIG.input1) {
// Place your Shelly.Call here
}
} else {
return true;
}
},
);
feel free to re-open the issue if you need further assistance.
Many thanks @eurich!
Thank you for the examples! Some parts of it helped me to create the following script:
But I am still struggling how to run the script when a momentary switch is triggered (detached mode)
Can you please help me a little bit with the evenHandler part? Thanks in advance.