NEWS
Blockly - Klick auf Button soll die Helligkeit der Lampe erhöhen?
-
Hi Leute,
ich bräuchte mal nen Tipp. Hab per ZigBee Adapter Ikea Lampen und die Fernbedienung eingebunden. Nun hat man an der Fernbedienung ja die Möglichkeit des aufdimmen und abdimmen, sowie die Wärme des Lichts mit jedem Klick zu verändern.Hat einer ne Idee wie ich das in Blockly umsetzen kann, das z.B beim Buton Aufhellen jedesmal der Helligkeitswert um 10 Prozent erhöht wird? Es handelt sich dabei um einen Prozentwert.
Hab hier was angefangen aber komme nicht weiter:
// Lampe ein und ausschalten on({id: "zigbee.0.000b57fffedbc2b4.toggle"/*Toggle event*/, val: true}, function (obj) { var value = obj.state.val; var oldValue = obj.oldState.val; if (getState("tradfri.0.L-65537.lightbulb.state").val == false) { setState("tradfri.0.L-65537.lightbulb.state"/*on/off*/, true); } if (getState("tradfri.0.L-65537.lightbulb.state").val == true) { setState("tradfri.0.L-65537.lightbulb.state"/*on/off*/, false); } // Lampe aufhellen on({id: "zigbee.0.000b57fffedbc2b4.up_click"/*Up click event*/, val: true}, function (obj) { var value = obj.state.val; var oldValue = obj.oldState.val; if (getState("tradfri.0.L-65537.lightbulb.state").val == true) { setState("tradfri.0.L-65537.lightbulb.brightness"/*Brightness*/, (getState("tradfri.0.L-65537.lightbulb.brightness").val + 10)); } }); }); //JTNDeG1sJTIweG1sbnMlM0QlMjJodHRwJTNBJTJGJTJGd3d3LnczLm9yZyUyRjE5OTklMkZ4aHRtbCUyMiUzRSUzQ2Jsb2NrJTIwdHlwZSUzRCUyMmNvbW1lbnQlMjIlMjBpZCUzRCUyMiUzRnFQZnhmJTNGODMlNDA2XyUzRjJEJTNBVVcuNiUyMiUyMHglM0QlMjItODglMjIlMjB5JTNEJTIyLTg3JTIyJTNFJTNDZmllbGQlMjBuYW1lJTNEJTIyQ09NTUVOVCUyMiUzRUxhbXBlJTIwZWluJTIwdW5kJTIwYXVzc2NoYWx0ZW4lM0MlMkZmaWVsZCUzRSUzQ25leHQlM0U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NEJTIyQVRUUiUyMiUzRXZhbCUzQyUyRmZpZWxkJTNFJTNDZmllbGQlMjBuYW1lJTNEJTIyT0lEJTIyJTNFdHJhZGZyaS4wLkwtNjU1MzcubGlnaHRidWxiLmJyaWdodG5lc3MlM0MlMkZmaWVsZCUzRSUzQyUyRmJsb2NrJTNFJTNDJTJGdmFsdWUlM0UlM0N2YWx1ZSUyMG5hbWUlM0QlMjJCJTIyJTNFJTNDc2hhZG93JTIwdHlwZSUzRCUyMm1hdGhfbnVtYmVyJTIyJTIwaWQlM0QlMjJFYSUyQ1ZNTlRfbUtJKF9qJTNGKVdBJTYwaCUyMiUzRSUzQ2ZpZWxkJTIwbmFtZSUzRCUyMk5VTSUyMiUzRTEwJTNDJTJGZmllbGQlM0UlM0MlMkZzaGFkb3clM0UlM0MlMkZ2YWx1ZSUzRSUzQyUyRmJsb2NrJTNFJTNDJTJGdmFsdWUlM0UlM0MlMkZibG9jayUzRSUzQyUyRnN0YXRlbWVudCUzRSUzQyUyRmJsb2NrJTNFJTNDJTJGc3RhdGVtZW50JTNFJTNDJTJGYmxvY2slM0UlM0MlMkZuZXh0JTNFJTNDJTJGYmxvY2slM0UlM0MlMkZuZXh0JTNFJTNDJTJGYmxvY2slM0UlM0MlMkZuZXh0JTNFJTNDJTJGYmxvY2slM0UlM0MlMkZzdGF0ZW1lbnQlM0UlM0MlMkZibG9jayUzRSUzQyUyRm5leHQlM0UlM0MlMkZibG9jayUzRSUzQyUyRnhtbCUzRQ==
-
@smarti2015 Der Eintrag ist schon etwas älter, aber bist Du erfolgreich gewesen und hast eine Lösung gefunden ?
-
@smarti2015 sagte: Hab hier was angefangen aber komme nicht weiter:
Keine Trigger innerhalb von Triggern verwenden!
Vorschlag: