@armilar
Habe die Schaltung soweit fertiggestellt. Leider funktioniert diese irgendwie nicht so richtig. Ich betrete den Raum, Licht geht an i.O., nach 30 Sek leider auch wieder aus obwohl eine erneute Bewegung stattfindet. Ich bewege mich weiter im Raum leider keine Reaktion und auf einmal geht die Lampe wieder an und dann nach ca. 20 Sek wieder aus. Wenn ich den Raum betrete geht das Licht an und wenn ich dann den Schalter betätige, geht die Lampe aus und fängt dann willkürlich an zu blinken.


<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="R8XY_=dk_G6-)1S:=;EB">Schalter_an</variable>
<variable type="timeout" id="timeout">timeout</variable>
</variables>
<block type="variables_set" id="}CItR,h-o^cddY32vu^5" x="-962" y="-562">
<field name="VAR" id="R8XY_=dk_G6-)1S:=;EB">Schalter_an</field>
<value name="VALUE">
<block type="get_value_var" id="0q6t?M5`Fikei=DZlhh.">
<field name="ATTR">val</field>
<value name="OID">
<shadow type="text" id="?.8o;mOO^kQNr#1}@]JM">
<field name="TEXT"></field>
</shadow>
<block type="field_oid" id="-^w]~qRX}9(3~@URdZ2G">
<field name="oid">hm-rpc.1.00085BE98F0B6B.4.STATE</field>
</block>
</value>
</block>
</value>
<next>
<block type="on_ext" id="c7Gs~,7*5`nU:tgPpD1C">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="9F=1(uB*uwuXi5KB*$M7">
<field name="oid">hm-rpc.1.00085BE98F0B6B.4.STATE</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="variables_set" id="NA-DRD]+w3loXX%yr=8{">
<field name="VAR" id="R8XY_=dk_G6-)1S:=;EB">Schalter_an</field>
<value name="VALUE">
<block type="logic_negate" id="0IQ$4]^glz]n7ZvSG%)7">
<value name="BOOL">
<block type="variables_get" id="*7+!g,~o2]_V29LvHxsR">
<field name="VAR" id="R8XY_=dk_G6-)1S:=;EB">Schalter_an</field>
</block>
</value>
</block>
</value>
<next>
<block type="controls_if" id="$|2iFM}3R.O-|dHgEs).">
<mutation else="1"></mutation>
<value name="IF0">
<block type="variables_get" id="zJs8@_pAJL:OY$9C)Siu">
<field name="VAR" id="R8XY_=dk_G6-)1S:=;EB">Schalter_an</field>
</block>
</value>
<statement name="DO0">
<block type="control" id="ejv^DGVv2yXQ=`MIV+R[">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">hm-rpc.1.00085BE98F0B6B.4.STATE</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="6tY4H}u:syM`e46:9|2n">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="control" id="p/e8O-y#,YLe,Zh?)}6w">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">hue.1.Esstisch_Zone.level</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="9lUnH,vwW:,oC|])RO1J">
<field name="NUM">100</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<statement name="ELSE">
<block type="control" id="~E(QOxBZHBonTF-c$,BG">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">hm-rpc.1.00085BE98F0B6B.4.STATE</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="AU,,(tfUYR1[[u$cUeu!">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</statement>
<next>
<block type="on_ext" id="{TRn~M)~m`2NiLo?Vh(=">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="}A|NB2FWvKg+_w*x/;$]">
<field name="oid">hue.0.BWM_Esszimmer_1.presence</field>
</shadow>
</value>
<value name="OID1">
<shadow type="field_oid" id="Y^t!0Zi^(KqJ`qS3:^|A">
<field name="oid">hue.0.BWM_Esszimmer_2.presence</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="tpX(rch{||1_(57j,#S,">
<value name="IF0">
<block type="logic_operation" id="1D:`9XxVK^Y_TtYZnPCs" inline="false">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="l,*{NQVI3S(_cUAL|ryR">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="HXPD6fA#yb]S9^EX..2E">
<field name="VAR" id="R8XY_=dk_G6-)1S:=;EB">Schalter_an</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="`VyjOsk67)AIff0w)A$6">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="*hL92__WJVU[PHAcUe}n">
<field name="OP">LT</field>
<value name="A">
<block type="get_value_var" id="=0KlD14_@F%;sLJ$_$L;">
<field name="ATTR">val</field>
<value name="OID">
<shadow type="text" id="k0u}J.;zQlEUtWkC#gB8">
<field name="TEXT"></field>
</shadow>
<block type="field_oid" id="OXLFC%D@pUpxy.$.VF3z">
<field name="oid">hm-rpc.1.0031DD89A9F6B4.1.ILLUMINATION</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="math_number" id="?o%^VARl/wOq=$4MVRdz">
<field name="NUM">50</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="(3k-^%_7_@d-CYk$!gcp">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">hm-rpc.1.00085BE98F0B6B.4.STATE</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="u2|_@DTRHxNC{HIYO6-c">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="control" id="hLpBAr^.e0Re4B_uuUQX">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">hue.1.Esstisch_Zone.level</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="7LBj=0Dp92aP+F-/yNjF">
<field name="NUM">50</field>
</block>
</value>
<next>
<block type="timeouts_cleartimeout" id="w5g~`hSS.X/CKhm`N,z`">
<field name="NAME">timeout</field>
<next>
<block type="timeouts_settimeout" id=";_(;ov3s*%^G3}OG8%a:">
<field name="NAME">timeout</field>
<field name="DELAY">30</field>
<field name="UNIT">sec</field>
<statement name="STATEMENT">
<block type="control" id="imjPn!$@UuwI[2ltY;w$">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">hm-rpc.1.00085BE98F0B6B.4.STATE</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="tYb)8MV+3vTllq),#7A{">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</xml>