Diese Script wurde von einem ehemaligen User erstell Klaus alias k-s
Also hier die Blocky-Grafik:
Und hier das Blocky-Skript:
Spoiler
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="on_ext" id="NUagg%u4Uu1{rA8C[o%z" x="-487" y="-737">
<mutation items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="}0*NU#x2*`;WIrjSY6Oj">
<field name="oid">mihome.0.devices.magnet_158d00024245c4.state</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="comment" id="Pv1s6`],RW[3/09xD!;[">
<field name="COMMENT">Voraussetzungen prüfen</field>
<next>
<block type="controls_if" id="vlNP}J(Okf#S~MPQ1;ae">
<value name="IF0">
<block type="logic_operation" id="~s%)sJ+:Z-P4-@Mv7ehs" inline="false">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="].fxn:%7l_q~tLa_RxhK">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="vv85Y;.n_%J;p5YN/86*">
<field name="ATTR">val</field>
<field name="OID">mihome.0.devices.magnet_158d00024245c4.state</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="%`n%h:]MX0zY)F):Y.[c">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_operation" id=".@1olFKhw%d3_AW`|4QB" inline="false">
<field name="OP">AND</field>
<value name="A">
<block type="time_compare_ex" id="jN0lm}YQwZA/J9!,YRdx">
<mutation end_time="true" actual_time="true"></mutation>
<field name="USE_ACTUAL_TIME">TRUE</field>
<field name="OPTION">between</field>
<value name="START_TIME">
<shadow type="text" id="]F0yteGP0*V.nQuuQeIp">
<field name="TEXT">16:00</field>
</shadow>
</value>
<value name="END_TIME">
<shadow type="text" id="Pr1s[M6S.thC8Y~TYJ6y">
<field name="TEXT">18:00</field>
</shadow>
</value>
</block>
</value>
<value name="B">
<block type="logic_operation" id="*%@Q!l-T~^CH;%5#R5|{" inline="false">
<field name="OP">OR</field>
<value name="A">
<block type="logic_compare" id="!z}kS==`la2~ZbDhYfeq">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="D|6{(-o1-,jaHVv4k70]">
<field name="ATTR">val</field>
<field name="OID">Meine.Schalter.Olaf.ipHere</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="uT*kNiGGtQUXBzf]n^+F">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="E.-3KrBm8n*pzGj^[|J`">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="!H~RcliIX)-)Kqr|v-Ga">
<field name="ATTR">val</field>
<field name="OID">Meine.Schalter.Dani.ipHere</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="wO@0X:V_Yx(B{M}@%)Y3">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="debug" id="(({]F/^EuOCON^*yKJJ=">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="%3/wF:E3#?5E1Oc6KLXo">
<field name="TEXT">Ansagevoraussetzungen sind erfüllt </field>
</shadow>
</value>
<next>
<block type="comment" id=",YX.+xj9CrhL[c;ep@HG">
<field name="COMMENT">Wer hat die Tür geöffnet?</field>
<next>
<block type="controls_if" id=",3[C%N-Ir!U6GDaBcl=S">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="N.b2zH@mwduFK`R:F3NU">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="~)}4~s^}=HHAu@Eg[ZPB">
<field name="ATTR">val</field>
<field name="OID">Meine.Schalter.Olaf.ipHere</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="ByUaal+B(9)t#MI;GZc[">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="debug" id=",4l0*u:_XWwWH!O*HiEE">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="4z(s8M^`s/!:ILa^LGsg">
<field name="TEXT">Willkommen Olaf</field>
</shadow>
</value>
<next>
<block type="comment" id="H4x?2Ze0lv%/{Y_?/r;^">
<field name="COMMENT">Olaf hat die Tür geöffnet</field>
<next>
<block type="control" id="Amb]UGsZ3|lgv]Ec~P`p">
<mutation delay_input="true"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090L91180922J9C.Commands.speak</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">20</field>
<field name="UNIT">sec</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="text_join" id="`j)-FHq[D{xg3=%S_M:~">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="text" id="1WS:tlyYztqsN)10s=6n">
<field name="TEXT">Hallo Olaf</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="p2nDd0YD3my?b]znPbSP">
<field name="TEXT">Willkommen zu Haus</field>
</block>
</value>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="2Q{:Ifb1*_hn=x{ZPsVa">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="xy_KV3dHx9Jr0-G7!1.,">
<field name="ATTR">val</field>
<field name="OID">Meine.Schalter.Dani.ipHere</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="?C68m{*#QXMl=/H~VrLB">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="debug" id="RlZdb;7W*dBfQXU*2`Et">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="5bXK-~L]4(55F%r7fP%R">
<field name="TEXT">Willkommen Dani</field>
</shadow>
</value>
<next>
<block type="comment" id="E|Ht-0)lRY{471)KN4Bc">
<field name="COMMENT">Dani hat die Tür geöffnet</field>
<next>
<block type="control" id="vyV8B*y16qKgB);~?.T1">
<mutation delay_input="true"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090L91180922J9C.Commands.speak</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">20</field>
<field name="UNIT">sec</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="text_join" id="+QXJqY/KO}VnO,{O)mM!">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="text" id="iFc|fz^]tVo%ksEZh=ZP">
<field name="TEXT">Hallo Dani</field>
</block>
</value>
<value name="ADD1">
<block type="text" id=":#HyDf!=eiy+,ECY-tN5">
<field name="TEXT">Willkommen zu Haus</field>
</block>
</value>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</xml>
Gruss Klaus