Code
Shelly.addEventHandler(function(e) {
if (e.component === "input:1") {
if (e.info.event === "single_push") {
Shelly.call("Cover.GoToPosition", {'id': 0, 'pos': 20});
} else if (e.info.event === "long_push") {
Shelly.call("Cover.close", {'id': 0});
} else if (e.info.event === "double_push") {
Shelly.call("Cover.GoToPosition", {'id': 0, 'pos': 60});
}
} else if (e.component === "input:0") {
if (e.info.event === "single_push") {
Shelly.call("Cover.GoToPosition", {'id': 0, 'pos': 100});
} else if (e.info.event === "long_push") {
Shelly.call("Cover.Stop", {'id': 0});
}
}
});
Alles anzeigen
Jetzt müsste es richtig zu lesen sein, wäre nett wenn sich das mal einer anschaut.