@bacado sagte: Folgendes ist gewünscht:
Vorschlag:
[image: 1674932317518-blockly_temp.jpg]
Spoiler
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="?,h:f}.OAF+=$YSwL[!l">ein</variable>
<variable id="fD`y8)BjvBmZkIjCGMx{">hauptlicht</variable>
<variable type="timeout" id="timeout">timeout</variable>
</variables>
<block type="on" id="ym3sQ8a-q/XTHHF1Y88{" x="-312" y="1762">
<field name="OID">0_userdata.0.Zeithilfe.Nachtlicht</field>
<field name="CONDITION">false</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="procedures_callnoreturn" id="h~hZ3xG^YW`?9c_P[3FF" inline="true">
<mutation name="indirekt">
<arg name="ein"></arg>
</mutation>
<value name="ARG0">
<block type="logic_boolean" id="f8b`vpNoSSw/Rv[5!v=v">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
<next>
<block type="on" id="a[0,K7vQk)?uxvvavMSr">
<field name="OID">openknx.0.Obergeschoss.Leuchten_Schalten.BadZentralAus</field>
<field name="CONDITION">any</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="procedures_callnoreturn" id="8+$*ao{u4Wj#G!z!oUYk" inline="true">
<mutation name="indirekt">
<arg name="ein"></arg>
</mutation>
<value name="ARG0">
<block type="logic_boolean" id="-X[uhrtK)o!*)iczOc_l">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
<next>
<block type="on_ext" id="5NROZ2ogdfnre9OGiQLj">
<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="Rm,b,s8RBf*[:)V,D#/z">
<field name="oid">openknx.0.Obergeschoss.Leuchten_Schalten.Badezimmer_Bad_Ein_aus</field>
</shadow>
</value>
<value name="OID1">
<shadow type="field_oid" id="gXG7N:PVaT,1DM6@8[nF">
<field name="oid">openknx.0.Obergeschoss.Leuchten_Schalten.Badezimmer_Dusche_Ein_aus</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="variables_set" id="(R3,*r;9o4*9ya%(Ox+{">
<field name="VAR" id="fD`y8)BjvBmZkIjCGMx{">hauptlicht</field>
<value name="VALUE">
<block type="logic_operation" id="3Ur#1_WV_~e#|tV3e01l" inline="false">
<field name="OP">OR</field>
<value name="A">
<block type="get_value" id="9z%H}x.LDxSu%PuME.~)">
<field name="ATTR">val</field>
<field name="OID">openknx.0.Obergeschoss.Leuchten_Status.Badezimmer_Bad_Ein_aus</field>
</block>
</value>
<value name="B">
<block type="get_value" id="3(6c/{Brvkxi5obj0#Ya">
<field name="ATTR">val</field>
<field name="OID">openknx.0.Obergeschoss.Leuchten_Status.Badezimmer_Dusche_Ein_aus</field>
</block>
</value>
</block>
</value>
<next>
<block type="procedures_callnoreturn" id="A_)6$~d|I+ag?OnlV?f^" inline="true">
<mutation name="indirekt">
<arg name="ein"></arg>
</mutation>
<value name="ARG0">
<block type="logic_operation" id="#^G(+x[YF,!iimi3TQ6U">
<field name="OP">AND</field>
<value name="A">
<block type="variables_get" id="@/ZI%]2+(M]T~J2,p.?Q">
<field name="VAR" id="fD`y8)BjvBmZkIjCGMx{">hauptlicht</field>
</block>
</value>
<value name="B">
<block type="get_value" id="i)|[#gQ!1D/oblvmfs*a">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Zeithilfe.Nachtlicht</field>
</block>
</value>
</block>
</value>
</block>
</next>
</block>
</statement>
<next>
<block type="on_ext" id="]tl|pI^Zy14-K9!@Iaok">
<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="7),$o:5!ozN1WSxlV#Tw">
<field name="oid">zigbee.0.a4c1388f02e12050.occupancy</field>
</shadow>
</value>
<value name="OID1">
<shadow type="field_oid" id="o^|0q5]U`2?^iqQ@jTIy">
<field name="oid">zigbee.0.00124b002508d3eb.occupancy</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="!5:*;E=DoNK[_bk;@Wai">
<value name="IF0">
<block type="logic_operation" id="u9T@:){.loez-HMVOClJ" inline="false">
<field name="OP">AND</field>
<value name="A">
<block type="get_value" id="3_.[tN$7uzx6ItGm:CK{">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Zeithilfe.Nachtlicht</field>
</block>
</value>
<value name="B">
<block type="logic_negate" id="lC_L:cY=0A_x.4bi8`.=">
<value name="BOOL">
<block type="variables_get" id="^F^K42WT$Z=[;gLiPY7/">
<field name="VAR" id="fD`y8)BjvBmZkIjCGMx{">hauptlicht</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="controls_if" id="k#ljA},8~6yz*F((;wmY">
<mutation else="1"></mutation>
<value name="IF0">
<block type="logic_operation" id="d8*dsIQob;fuktj47_bF" inline="false">
<field name="OP">OR</field>
<value name="A">
<block type="get_value" id=")y]prKI~2rckQq9,R)(.">
<field name="ATTR">val</field>
<field name="OID">zigbee.0.00124b002508d3eb.occupancy</field>
</block>
</value>
<value name="B">
<block type="get_value" id="Uaf*xd*W.o**nrIyf=Rs">
<field name="ATTR">val</field>
<field name="OID">zigbee.0.a4c1388f02e12050.occupancy</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="procedures_callnoreturn" id="{mLh[m_L*t9,esucYy)#" inline="true">
<mutation name="indirekt">
<arg name="ein"></arg>
</mutation>
<value name="ARG0">
<block type="logic_boolean" id="de(/JP/O*Z:v/0_gd`bo">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="timeouts_settimeout" id=".m-G8rv8F(f]?*9LY}$e">
<field name="NAME">timeout</field>
<field name="DELAY">70</field>
<field name="UNIT">sec</field>
<statement name="STATEMENT">
<block type="procedures_callnoreturn" id="n;yhcacp`4EUDW!:%r(Z" inline="true">
<mutation name="indirekt">
<arg name="ein"></arg>
</mutation>
<value name="ARG0">
<block type="logic_boolean" id="S*lz`ILNUW-wv0%ToC8U">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
<block type="procedures_defnoreturn" id="NEip`/m*@B5EXT+aE*!^" x="538" y="1763">
<mutation>
<arg name="ein" varid="?,h:f}.OAF+=$YSwL[!l"></arg>
</mutation>
<field name="NAME">indirekt</field>
<comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
<statement name="STACK">
<block type="control" id="nF:y6{O~,-7o,LYlP1hu">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">wled.0.40915144e793.seg.0.on</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="variables_get" id="]oV,_3($m,h.dze$3ic`">
<field name="VAR" id="?,h:f}.OAF+=$YSwL[!l">ein</field>
</block>
</value>
<next>
<block type="control" id="%X{hE3sFXP6l;q`}%/sR">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">zigbee.0.ec1bbdfffe7f5bc5.state</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="variables_get" id="ZD!;u*H/wlYx`A!5;Zv~">
<field name="VAR" id="?,h:f}.OAF+=$YSwL[!l">ein</field>
</block>
</value>
<next>
<block type="control" id="Wa_UUjmCDr:yop^[OWVI">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">wled.0.58bf25d755ca.seg.0.on</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="variables_get" id="^7W?EQ3YI/ol(ZdbPA2)">
<field name="VAR" id="?,h:f}.OAF+=$YSwL[!l">ein</field>
</block>
</value>
<next>
<block type="controls_if" id="SAxk7Uc(dE[TZ$@Q2E?q">
<value name="IF0">
<block type="variables_get" id="SVV]sWc}W9QV4UmhX2S4">
<field name="VAR" id="?,h:f}.OAF+=$YSwL[!l">ein</field>
</block>
</value>
<statement name="DO0">
<block type="timeouts_cleartimeout" id="dQvjSEVQ+F1XU`BchX*C">
<field name="NAME">timeout</field>
<next>
<block type="comment" id="Z%a?UBi^j~KNs2nQOY$*">
<field name="COMMENT">Wled Dusche</field>
<next>
<block type="control" id="{y;-AaPonj%HO.$CochM">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">wled.0.40915144e793.ps</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id=",Z*@~I*HxVF~u9Xo?PJA">
<field name="NUM">1</field>
</block>
</value>
<next>
<block type="control" id="OE6CHy@M|(6-0;{BrG`h">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">wled.0.40915144e793.bri</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="C|x4hmzZbewM5%I#53{3">
<field name="NUM">200</field>
</block>
</value>
<next>
<block type="comment" id="pd61e/P=*$qJUQi{?Fjc">
<field name="COMMENT">Badezimmerschrank</field>
<next>
<block type="control" id="VHOa=9Z2%7kMu:DLrwj$">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">zigbee.0.ec1bbdfffe7f5bc5.colortemp</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="g)[f1U]Y8%5Og,pgSocz">
<field name="NUM">2200</field>
</block>
</value>
<next>
<block type="control" id="9j^wMSxRhQ9rrt!VX([r">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">zigbee.0.ec1bbdfffe7f5bc5.brightness</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="ngt!{os6yB(.Qy-cN9cK">
<field name="NUM">30</field>
</block>
</value>
<next>
<block type="comment" id="b5N:p5UR`u%`]Ea1}Ajv">
<field name="COMMENT">Badewanne</field>
<next>
<block type="control" id="]UV+%]3KtV|;O[2a=k0P">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">wled.0.58bf25d755ca.ps</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="!KbL$(26t6EDwEHmtizC">
<field name="NUM">1</field>
</block>
</value>
<next>
<block type="control" id="v_?KW6ExjY}U8WF.?+aR">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">wled.0.58bf25d755ca.bri</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="oLT(I;!S./N4Wzl)S^I[">
<field name="NUM">200</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</xml>