Hier mein Blockly mit dem ich im Flur das Licht Abends und Nachts per BWM einschalte.
Weiterhin ist Dauerlicht durch den normalen Lichtschalter möglich.
BLOCKLY
Code: FlurBWM
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="on" id="wo@m|fL`n/t$,A7/nt.P" x="-838" y="-63">
<field name="OID">deconz.0.Sensors.7.presence</field>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="controls_if" id="wiw9bz9,Tc=mN;Hh~Zsg">
<value name="IF0">
<block type="time_compare_ex" id="x*Tg8kbN#w$@5D2?t38g">
<mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation>
<field name="USE_ACTUAL_TIME">TRUE</field>
<field name="OPTION">not between</field>
<value name="START_TIME">
<shadow type="text" id="$4{}:J{]Ukgd/N**f{x4">
<field name="TEXT">12:00</field>
</shadow>
<block type="time_astro" id="nt/;,+KNV?{P33*;I0C*">
<field name="TYPE">sunrise</field>
<field name="OFFSET">40</field>
</block>
</value>
<value name="END_TIME">
<shadow type="text" id="?eT3x3[tTVEnDB:eKk.7">
<field name="TEXT">18:00</field>
</shadow>
<block type="time_astro" id="3OesF3O}Oco:Wdb,i/ya">
<field name="TYPE">sunset</field>
<field name="OFFSET">-40</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="controls_if" id="JdD0bissU)%|%Ay[CgMR">
<value name="IF0">
<block type="logic_operation" id="EV-]MxK[g^g8HK^gTx[n">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="1gW-;g@^pp),3(r{gQ_2">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="wxU4vg3G:b1K@HrbLDPD">
<field name="ATTR">val</field>
<field name="OID">deconz.0.Sensors.7.presence</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id=",{V7{`+vmy)]$/=Vh|`T">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="fOu-!uM46DwvEm+*TC00">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="[HIcym^K:bf$~PJVIg3U">
<field name="ATTR">val</field>
<field name="OID">shelly.0.SHSW-1#40F5202D7331#1.Relay0.Input</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id=":e9sbzg]W~skot`QZS@W">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="Q9gK`s6q}ZOjhs9.r3MH">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">shelly.0.SHSW-1#40F5202D7331#1.Relay0.Switch</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="TcZ6mK9]DRil!huMM)q7">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="control" id="}/HAt|cjcWM%7PJ}-;57">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
<field name="OID">shelly.0.SHSW-1#40F5202D7331#1.Relay0.Switch</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">3</field>
<field name="UNIT">min</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="L2Ow#|XO4k|-1t9Aex6E">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</statement>
</block>
</xml>
Alles anzeigen