NEWS
[gelöst]Türenabfrage Hilfe
-
@kuessel25: Tür:falseManuell:true
manuell_ein geht auf true, was nicht sein dürfte. Poste bitte den von Blockly erzeugten Javascript-Code ohne die letzte Zeile in Code tags.
@paul53 sagte in Türenabfrage Hilfe:
Blockly erzeugten Javascript-Code
ich weiß jetzt nicht ob ich das richtig verstanden habe,
var manuell_ein, urspung; on({id: 'zigbee.0.00158d0003d08254.opened', change: "ne"}, async function (obj) { var value = obj.state.val; var oldValue = obj.oldState.val; console.log((['Tür:',(obj.state ? obj.state.val : ""),'Manuell:',manuell_ein].join(''))); if (!manuell_ein) { setState("sonoff.0.Küche Licht.POWER"/*Küche Licht POWER*/, (obj.state ? obj.state.val : "")); } }); // licht on({id: 'sonoff.0.Küche Licht.POWER', change: "ne"}, async function (obj) { var value = obj.state.val; var oldValue = obj.oldState.val; console.log((['Licht:',(obj.state ? obj.state.val : ""),'Ursprung:',(obj.state ? obj.state.from : "")].join(''))); manuell_ein = (obj.state ? obj.state.val : "") && (obj.state ? obj.state.from : "") != 'system.adapter.javascript.0'; }); on({id: 'sonoff.0.Küche Licht.POWER', change: "ne"}, async function (obj) { var value = obj.state.val; var oldValue = obj.oldState.val; manuell_ein = (obj.state ? obj.state.val : "") && urspung != 'javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test'; }); -
@paul53 sagte in Türenabfrage Hilfe:
Blockly erzeugten Javascript-Code
ich weiß jetzt nicht ob ich das richtig verstanden habe,
var manuell_ein, urspung; on({id: 'zigbee.0.00158d0003d08254.opened', change: "ne"}, async function (obj) { var value = obj.state.val; var oldValue = obj.oldState.val; console.log((['Tür:',(obj.state ? obj.state.val : ""),'Manuell:',manuell_ein].join(''))); if (!manuell_ein) { setState("sonoff.0.Küche Licht.POWER"/*Küche Licht POWER*/, (obj.state ? obj.state.val : "")); } }); // licht on({id: 'sonoff.0.Küche Licht.POWER', change: "ne"}, async function (obj) { var value = obj.state.val; var oldValue = obj.oldState.val; console.log((['Licht:',(obj.state ? obj.state.val : ""),'Ursprung:',(obj.state ? obj.state.from : "")].join(''))); manuell_ein = (obj.state ? obj.state.val : "") && (obj.state ? obj.state.from : "") != 'system.adapter.javascript.0'; }); on({id: 'sonoff.0.Küche Licht.POWER', change: "ne"}, async function (obj) { var value = obj.state.val; var oldValue = obj.oldState.val; manuell_ein = (obj.state ? obj.state.val : "") && urspung != 'javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test'; });@kuessel25 sagte: manuell_ein = (obj.state ? obj.state.val : "") && urspung != javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test';
So kann es nicht funktionieren ! Lösche den Trigger-Block rechts unten.

-
@kuessel25 sagte: manuell_ein = (obj.state ? obj.state.val : "") && urspung != javascript.0.scriptEnabled.verbrauchsmessung+kosten.licht_tür_test';
So kann es nicht funktionieren ! Lösche den Trigger-Block rechts unten.

-
@kuessel25 sagte: hatte ich nicht gesehen,danke!
Vor einem Import alles löschen!
@kuessel25 sagte in Türenabfrage Hilfe:
jetzt gehts
Dann markiere das Thema in der Überschrift des ersten Beitrags als [gelöst].
-
@kuessel25 sagte: hatte ich nicht gesehen,danke!
Vor einem Import alles löschen!
@kuessel25 sagte in Türenabfrage Hilfe:
jetzt gehts
Dann markiere das Thema in der Überschrift des ersten Beitrags als [gelöst].
-
@paul53
hätte noch ne kleine frage,und zwar wäre es jetzt noch möglich eine verzögerung einzubauen falls ich die türe schließe und das licht zb noch 5min an bleiben soll?@kuessel25 sagte: verzögerung einzubauen falls ich die türe schließe und das licht zb noch 5min an bleiben soll?
