NEWS
[solved] Skriptprobleme
-
Ich habe folgendes Skript bei mir laufen.
<block xmlns="https://developers.google.com/blockly/xml" type="on" id="WDi:](4ssESe^3dhZ!v+" x="-362" y="-1093"> <field name="OID">ecovacs-deebot.0.status.device</field> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="b8cu1SYU=7P59x=1X3wr"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="diTiOl0L,0mYVTYX`tYs" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="t3dvYjb$qy{/[#{`^Yt]"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="K5{Bw|+~JI@dZVshKcJM"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="text" id=":Fhy{kn*Tb5A%jxa{?RP"> <field name="TEXT">charging</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="+Kp@CxZ?v,-@*;%]2gAn" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="-3?vUug`x)uL51pY;N)d"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="#;AY`6%ymMRV10RmP8/e"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="text" id="|452hZs/obp6T,RT)}5G"> <field name="TEXT">paused</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="CUwEh~AF;a*bCJCKqj^8"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="qo[Ir%qHojI4~Ebc/$v@"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="text" id=".6PxdSYl3[_kM(+.sUN,"> <field name="TEXT">stopped</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="#sT[H;rx5RLs!#6GYZT6"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">javascript.0.EigeneDatenpunkte.ohne_Kamera</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="Zbdw-]:5fA]tBi]9St|("> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="control" id="wsaM2?W`N.~[L#1Du(%("> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">javascript.0.EigeneDatenpunkte.ohne_Kamera</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="0S8OUWW%jX9w]}aq|Ps9"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> </block> </statement> </block>Als Trigger verwendet er den Device Status des Ecovacs Adapters. Was ich nicht verstehe ist: Er erkennt wenn sich der Datenpunkt ändert, er erkennt wenn es keiner der drei vorgegbenen Werte ist und setzt den Datenpunkt auf true. False soll er setzen wenn der device status entweder charging, stopped oder paused ist. Dieses tut er aber nicht. Ich bin wirklich verzweifelt weil ich nicht weiß warum...
-
Ich habe folgendes Skript bei mir laufen.
<block xmlns="https://developers.google.com/blockly/xml" type="on" id="WDi:](4ssESe^3dhZ!v+" x="-362" y="-1093"> <field name="OID">ecovacs-deebot.0.status.device</field> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="b8cu1SYU=7P59x=1X3wr"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="diTiOl0L,0mYVTYX`tYs" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="t3dvYjb$qy{/[#{`^Yt]"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="K5{Bw|+~JI@dZVshKcJM"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="text" id=":Fhy{kn*Tb5A%jxa{?RP"> <field name="TEXT">charging</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="+Kp@CxZ?v,-@*;%]2gAn" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="-3?vUug`x)uL51pY;N)d"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="#;AY`6%ymMRV10RmP8/e"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="text" id="|452hZs/obp6T,RT)}5G"> <field name="TEXT">paused</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="CUwEh~AF;a*bCJCKqj^8"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="qo[Ir%qHojI4~Ebc/$v@"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="text" id=".6PxdSYl3[_kM(+.sUN,"> <field name="TEXT">stopped</field> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="#sT[H;rx5RLs!#6GYZT6"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">javascript.0.EigeneDatenpunkte.ohne_Kamera</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="Zbdw-]:5fA]tBi]9St|("> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="control" id="wsaM2?W`N.~[L#1Du(%("> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">javascript.0.EigeneDatenpunkte.ohne_Kamera</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="0S8OUWW%jX9w]}aq|Ps9"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> </block> </statement> </block>Als Trigger verwendet er den Device Status des Ecovacs Adapters. Was ich nicht verstehe ist: Er erkennt wenn sich der Datenpunkt ändert, er erkennt wenn es keiner der drei vorgegbenen Werte ist und setzt den Datenpunkt auf true. False soll er setzen wenn der device status entweder charging, stopped oder paused ist. Dieses tut er aber nicht. Ich bin wirklich verzweifelt weil ich nicht weiß warum...
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden