<xml xmlns="https://developers.google.com/blockly/xml">
<block type="on" id="wo@m|fL`n/t$,A7/nt.P" x="-837" y="-87">
<field name="OID">shelly.0.SHMOS-01#60A42395F28C#1.sensor.motion</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">shelly.0.SHMOS-01#60A42395F28C#1.sensor.motion</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>
</block>
</statement>
</block>
</statement>
</block>
</statement>
<next>
<block type="on" id="$6KiuW%H@mzy|XjGq{4r">
<field name="OID">shelly.0.SHMOS-01#60A42395F28C#1.sensor.motion</field>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="controls_if" id="*gdDEi?t_,lL8rxX-Ux_">
<value name="IF0">
<block type="logic_operation" id="1nS|G2j%OJb[s}Ac++*?">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id=".fE7)kOyFl+g.BNiy_HM">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="[1wX-]Y02}5!VSR15/)=">
<field name="ATTR">val</field>
<field name="OID">shelly.0.SHMOS-01#60A42395F28C#1.sensor.motion</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="iR5W[|Xnjn:2DXz5VLav">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="dZiO,)q=}6uS6?Mt7I,H">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="DM8}PnWUY^XOlCmfv9bq">
<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="XmZ,477V%B%B#U.mq*S*">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="dLe__EK1F|fTWc*%AbP%">
<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">2</field>
<field name="UNIT">min</field>
<field name="CLEAR_RUNNING">TRUE</field>
<value name="VALUE">
<block type="logic_boolean" id="nkJ!yKc0]^hR^rM*E8nB">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</xml>