Hallo Leute,
ich wollte einfach mal meinen smarten Adventskranz zeigen. (Deko kommt noch ).
Die Spannungsversorgung erfolgt über 2 Li-Akkus meiner Tauchlampe, so dass der Kranz kabellos einsetzbar ist.
Man könnte ihn aber auch mittels USB-Kabel mit 5V versorgen.
Der Spannungswandler erzeugt, dann aus der Eigangsspannung die 3,3V für die Kerzen, wodurch dann die Knopfzellen in den Kerzen ersetzt werden und sie beliebig schaltbar sind.
Das Script berechnet die Adventssonntage des aktuellen Jahres. Beim Einschalten wird anhand des aktuellen Datums berechnet wieviele Kerzen einzuschalten sind. Dann wird nach dem Zufallsprinzip die richtige Anzahl der Kerzen eingeschaltet.
Ist es noch vor dem 1. Advent werden alle Kerzen eingeschaltet.
Für das Video ist im Script ein Datum nach dem 2.Advent fest eingetragen gewesen.
Verwendete Hardware ist:
Zigbee 4fach-Schalter: (https://www.ebay.de/itm/185552014874)
Spannungswandler: (https://www.ebay.de/itm/175088552550)
LED Kerzen: (https://www.ebay.de/itm/165990403823)
Das Gehäuse hat mein Schwiegervater passend zum Kranz gedruckt.
Hier das Blockly zur Steuerung.
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="#f7x64t.J#oVp/{DCrW[">heute</variable>
<variable id="h#@yoh[f1Pz,BotHhhT4">Heiligabend</variable>
<variable id="v9@J:+ywDiYh/WJT^y5H">1.Advent</variable>
<variable id="DJ]2D4_(GB-}%u8BgaOR">2.Advent</variable>
<variable id=":*fd/Bo(f:ATCCGKJ}JH">3.Advent</variable>
<variable id="8z50rZMY?..`MLp#B][b">4.Advent</variable>
<variable id="J8M20.815L}gHMmd0tGF">Kerzen</variable>
<variable id="91Vgs+A1!IH*8)FLq[|*">anzKerzen</variable>
<variable id="t4lD:i5d0zdWY#8S$EN)">Lichter</variable>
</variables>
<block type="schedule" id=".Sg0Nb`{SJJVbmHk%tTO" x="238" y="238">
<field name="SCHEDULE">{"time":{"exactTime":true,"start":"00:01"},"period":{"days":1}}</field>
<statement name="STATEMENT">
<block type="variables_set" id="FyO~raoKcPlTI7H2S1Zd">
<field name="VAR" id="#f7x64t.J#oVp/{DCrW[">heute</field>
<value name="VALUE">
<block type="convert_from_date" id="+aFj4UY6@LpWiG0D%(_=">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">object</field>
<value name="VALUE">
<block type="text_join" id="Y-N3tD[2^qQ]k/E]?x9N" inline="false">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="time_get" id="p.b~_)v/{EIF[QHF,XB,">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">fy</field>
</block>
</value>
<value name="ADD1">
<block type="time_get" id=")2^MYB^uE~{47s:4(nAJ">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
<field name="OPTION">custom</field>
<field name="FORMAT">-MM-TT</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
</statement>
<next>
<block type="variables_set" id="-:ZCfV#NbAfn2?uC1Q3E">
<field name="VAR" id="#f7x64t.J#oVp/{DCrW[">heute</field>
<value name="VALUE">
<block type="convert_from_date" id="K?}+_x+F1Ba{)GfQ]]BP">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">object</field>
<value name="VALUE">
<block type="time_get" id="|FmHv6slRie@cr#qpy3!">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
<field name="OPTION">custom</field>
<field name="FORMAT">JJJJ-MM-TT</field>
</block>
</value>
</block>
</value>
<next>
<block type="comment" id="UI,pG3h70QFDmq=CSB`^">
<field name="COMMENT">Hier zum Testen ein festes Datum angeben.</field>
<next>
<block type="variables_set" id="zC-L(bfE$ySrxVba1f=_" disabled="true">
<field name="VAR" id="#f7x64t.J#oVp/{DCrW[">heute</field>
<value name="VALUE">
<block type="convert_from_date" id="lzxrB]--s{r9hScD,m,l">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">object</field>
<value name="VALUE">
<block type="text_join" id="}O#[c9YPlyTZl,Btr:F(">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="time_get" id="-19Je_NbBo,jd?^5*Ln3">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
<field name="OPTION">custom</field>
<field name="FORMAT">JJJJ-MM-</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="/{@sFfC2e^;^$3.9[t~O">
<field name="TEXT">11</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="/MnR5+v6v:;sDrA:p,$J">
<field name="VAR" id="h#@yoh[f1Pz,BotHhhT4">Heiligabend</field>
<value name="VALUE">
<block type="convert_from_date" id="wK[RUD9Kzh(?5sDk#yLF">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">object</field>
<value name="VALUE">
<block type="text_join" id="}tb+_u|kCtx_Z1*0_0%V" inline="false">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="time_get" id="/pSncHlaj.D2q`y|T/ZC">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">fy</field>
</block>
</value>
<value name="ADD1">
<block type="text" id="-453d-e985_k.KDEV+Fu">
<field name="TEXT">-12-24</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="!*Jw{lSK+#*81rC{]2Gx">
<field name="VAR" id="v9@J:+ywDiYh/WJT^y5H">1.Advent</field>
<value name="VALUE">
<block type="math_arithmetic" id="Bwj*5KNiPglCL!E25Wh." inline="false">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number" id="()M?ccWD9lo.6KoGkou?">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="=}I)W,kV8e=fe+TI[#jq">
<field name="VAR" id="h#@yoh[f1Pz,BotHhhT4">Heiligabend</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="Ytk)V9a1?P+%bl^l6n0D">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="Fb)A|,Ze1zA#CnAgcr1Z" inline="false">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow type="math_number" id="nX7?y5CbbA$[w6wQkw+V">
<field name="NUM">86400000</field>
</shadow>
</value>
<value name="B">
<shadow type="math_number" id="i5V,(*Q{Yph~r82+/{!">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="g6`+y]#$R4]=?+W4=+Pt" inline="false">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number" id="t}qS.[{{*~=8gnh-;PMe">
<field name="NUM">1</field>
</shadow>
<block type="convert_from_date" id="pZM4?rP=jau110oY,ypl">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">wd</field>
<value name="VALUE">
<block type="variables_get" id="-dPVrSK),Kk6nno}6(88">
<field name="VAR" id="h#@yoh[f1Pz,BotHhhT4">Heiligabend</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="ff3QXh`/Kr,O;Vw97d=`">
<field name="NUM">21</field>
</shadow>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="uA.(s/!ljadr8jPbdz+8">
<field name="VAR" id="DJ]2D4_(GB-}%u8BgaOR">2.Advent</field>
<value name="VALUE">
<block type="math_arithmetic" id="2=Ew)|.[n)X%=anI$j_e" inline="false">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number" id="c{?XXy_/%eV|k6]rO4f@">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="|S,T;T:]x{*KS0+6H`!=">
<field name="VAR" id="h#@yoh[f1Pz,BotHhhT4">Heiligabend</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="Ts45|Fgn0Lh!odIu8U^w">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="-Y3RDb?,%yMAx*3]wD)f" inline="false">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow type="math_number" id="B7`GML-gwEeF_#^fVm=2">
<field name="NUM">86400000</field>
</shadow>
</value>
<value name="B">
<shadow type="math_number" id="SQIiam`Sc{3J4uc8WlV^">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="yW0?RlepfbpzI0(dKa#9" inline="false">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number" id="HZV#aA~{/8llPG`Kmv#X">
<field name="NUM">1</field>
</shadow>
<block type="convert_from_date" id="4g+xX,`bcZ?b$9FO8P_3">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">wd</field>
<value name="VALUE">
<block type="variables_get" id="Af{PQ[I(y?$j2;TQ`j`T">
<field name="VAR" id="h#@yoh[f1Pz,BotHhhT4">Heiligabend</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="BNjj!H~-2:iHv2l;My;4">
<field name="NUM">14</field>
</shadow>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="%RwZ(43QD%7yZo`nLF6}">
<field name="VAR" id=":*fd/Bo(f:ATCCGKJ}JH">3.Advent</field>
<value name="VALUE">
<block type="math_arithmetic" id="Usf!2@K*3g9%s#c:5So2" inline="false">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number" id="*dMlnE^jECp:#6#y%Z*2">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="XT_)TXtOlpdSDoJ#F[`!">
<field name="VAR" id="h#@yoh[f1Pz,BotHhhT4">Heiligabend</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="DnV/tvl*Pm|$_,K2V-G9">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="*iui}~o-!=P76D}r`(ju" inline="false">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow type="math_number" id=".fqe-p0mfJs*ZlJjcgLG">
<field name="NUM">86400000</field>
</shadow>
</value>
<value name="B">
<shadow type="math_number" id="K6Hg[!|:[XkFp/Gi/{%k">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="oY]o0r8p`L+j}L~%AgRt" inline="false">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number" id="=vC}8#cblLz;L9b[h%#3">
<field name="NUM">1</field>
</shadow>
<block type="convert_from_date" id="`2qO8ZgAh;ji{@5%@~X!">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">wd</field>
<value name="VALUE">
<block type="variables_get" id="6%|TAg.~Wn`5dnVw2,fV">
<field name="VAR" id="h#@yoh[f1Pz,BotHhhT4">Heiligabend</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="3@1Q`kS(ctdkd~yW?r5n">
<field name="NUM">7</field>
</shadow>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="{;FJ|}[o([Ml=Hf+a:ej">
<field name="VAR" id="8z50rZMY?..`MLp#B][b">4.Advent</field>
<value name="VALUE">
<block type="math_arithmetic" id="o.e.{ueQA[io]U!8B4G!" inline="false">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number" id="3UEE3^_0e;Ydtk7E`3ik">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="A|Ky6sOvre*OWFm%oL)N">
<field name="VAR" id="h#@yoh[f1Pz,BotHhhT4">Heiligabend</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="nWc$dsrh#;MYWD[r,rke">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="N}`(xF|2#$Fa*-Oy``J=" inline="false">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow type="math_number" id="wDG2glO/4$xh{h|ZaZm~">
<field name="NUM">86400000</field>
</shadow>
</value>
<value name="B">
<shadow type="math_number" id="46%2i#JmWfMB1ME/G+Hf">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="I!M{vb^D!d*VSlobc=5H" inline="false">
<field name="OP">ADD</field>
<value name="A">
<shadow type="math_number" id="LM@y[PS3c^l/T:4c|O]]">
<field name="NUM">1</field>
</shadow>
<block type="convert_from_date" id="tDuofg5VZLoqO}50-wh3">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">wd</field>
<value name="VALUE">
<block type="variables_get" id="LW*m?R-:nUnVw;La]~~d">
<field name="VAR" id="h#@yoh[f1Pz,BotHhhT4">Heiligabend</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="5a%~9r##8p^Z4=L5%TAm">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="debug" id="bC?wJB4!!)eCt6tj!ZHs" disabled="true">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="A$uX.hX%;Di_T|?Aa9J_">
<field name="TEXT">test</field>
</shadow>
<block type="text_join" id="MOEm8}|ATe[k/+XT(/)o">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="text" id="_k9)kt2=_{NU}SDK3mqW">
<field name="TEXT">Heute: </field>
</block>
</value>
<value name="ADD1">
<block type="convert_from_date" id="sWt2k/I5D=Zw~x^BBE#*">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">DD.MM.YYYY</field>
<value name="VALUE">
<block type="variables_get" id="s/s1]YP89r|T;+iP*rC.">
<field name="VAR" id="#f7x64t.J#oVp/{DCrW[">heute</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="debug" id="|5VmPq,CeBFBE@V,.yvh" disabled="true">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="=I!Spp/Ez2siq=i~n9a$">
<field name="TEXT">test</field>
</shadow>
<block type="text_join" id="GOmUF^jI1aBSUfvlA)oF">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="text" id="9C?_}`gc*g7}SIG#[t}P">
<field name="TEXT">Heiligabend: </field>
</block>
</value>
<value name="ADD1">
<block type="convert_from_date" id="z[Wh=NoGZIS4@{y7@z6P">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">DD.MM.YYYY</field>
<value name="VALUE">
<block type="variables_get" id="/I;F+S%3Bqgn({4Z}#(o">
<field name="VAR" id="h#@yoh[f1Pz,BotHhhT4">Heiligabend</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="debug" id=")E_wH59tJ}TW5l+m|O." disabled="true">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="bse51-93..ca]YlXfFzp">
<field name="TEXT">test</field>
</shadow>
<block type="text_join" id="xo?S2+aq?7|8:Z}~Wq*_">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="text" id="Xx2Gx/q/NBS5:KQw.JN0">
<field name="TEXT">1.Advent: </field>
</block>
</value>
<value name="ADD1">
<block type="convert_from_date" id="_;gl6G%es/_pIA?v5:=@">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">DD.MM.YYYY</field>
<value name="VALUE">
<block type="variables_get" id="#tKaiB%]e)QvU?m#S3z;">
<field name="VAR" id="v9@J:+ywDiYh/WJT^y5H">1.Advent</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="debug" id="Q1d+g#Kh*(_B@IX@EV4X" disabled="true">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="@/Pp9|QqqmZ;c=-To6gY">
<field name="TEXT">test</field>
</shadow>
<block type="text_join" id="mjUg9r]FhrYZ2e;P:k4+">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="text" id="3{tQ{gz/G!vYCJ2*3zoK">
<field name="TEXT">2.Advent: </field>
</block>
</value>
<value name="ADD1">
<block type="convert_from_date" id="M:M:V(tHogfy+ODQneiS">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">DD.MM.YYYY</field>
<value name="VALUE">
<block type="variables_get" id="O7B|D^sKjv1@9aBgcb+C">
<field name="VAR" id="DJ]2D4_(GB-}%u8BgaOR">2.Advent</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="debug" id="1OIbE.4fiS`gSvQxA/8r" disabled="true">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="kXB.4TFHd~CxWimwt,ic">
<field name="TEXT">test</field>
</shadow>
<block type="text_join" id="zi5JqO6bnal-y{T1mIEd">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="text" id="Op//+YEM39[pt+7e_uze">
<field name="TEXT">3.Advent: </field>
</block>
</value>
<value name="ADD1">
<block type="convert_from_date" id="9hr1YM7A5d91EX[8u2M$">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">DD.MM.YYYY</field>
<value name="VALUE">
<block type="variables_get" id=":?]gV{Q,AK3YuHF?:T7x">
<field name="VAR" id=":*fd/Bo(f:ATCCGKJ}JH">3.Advent</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="debug" id=".dauZVmD%v#9nP7_8y/s" disabled="true">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="4MZ$Cz[Fyt}NUz^*A5T*">
<field name="TEXT">test</field>
</shadow>
<block type="text_join" id="cMDn(WJ5fyaKb+A!+(xm">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="text" id="Kw82J!2:(oY%ElNvm8=O">
<field name="TEXT">4.Advent: </field>
</block>
</value>
<value name="ADD1">
<block type="convert_from_date" id="f6%fT?V;`+RD$=+rq=wA">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">DD.MM.YYYY</field>
<value name="VALUE">
<block type="variables_get" id="iYFp[h%mYk!K/[(i8Ek2">
<field name="VAR" id="8z50rZMY?..`MLp#B][b">4.Advent</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="on" id="{OTHcU@g|Pi1C?YR8FVD">
<field name="OID">0_userdata.0.Adventskranz</field>
<field name="CONDITION">any</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="variables_set" id="YDD01]]fVMDx/N(|JxFW">
<field name="VAR" id="J8M20.815L}gHMmd0tGF">Kerzen</field>
<value name="VALUE">
<block type="selector" id="HU4-$4(ypZd[AN3g]A#*">
<field name="TEXT">state[id=*](functions=adventskerze)</field>
</block>
</value>
<next>
<block type="controls_if" id="vXc|W?tOs,@I|F2Daqse">
<mutation elseif="3" else="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="NIezR8C:_L;Dx]`d`Vn^">
<field name="OP">GTE</field>
<value name="A">
<block type="variables_get" id="XSY%(1MK7hBL0vl1*W%j">
<field name="VAR" id="#f7x64t.J#oVp/{DCrW[">heute</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="Q|fdFiKq,9i;F5w,1f2$">
<field name="VAR" id="8z50rZMY?..`MLp#B][b">4.Advent</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="bpaaUZLi^pG,t]-oYdb|">
<field name="VAR" id="91Vgs+A1!IH*8)FLq[|*">anzKerzen</field>
<value name="VALUE">
<block type="math_number" id="+,t6p5fkakhkC{T,P%Oe">
<field name="NUM">4</field>
</block>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_operation" id="qQhuUETGZ?u)c)~%}$~$" inline="false">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="^^YtQQs@t3YS:~=g;f2N">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id="#*HWDdG|-_nd^h,)#$7r">
<field name="VAR" id="#f7x64t.J#oVp/{DCrW[">heute</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="k%RgD]UM`paHjSl,.4?F">
<field name="VAR" id="8z50rZMY?..`MLp#B][b">4.Advent</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="#c7NfUMLW=h+M!|V/*$V">
<field name="OP">GTE</field>
<value name="A">
<block type="variables_get" id="[O0qgY1rRk)a[2RT,Oe$">
<field name="VAR" id="#f7x64t.J#oVp/{DCrW[">heute</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="%xrF{y@r!:C)O}8JQwR@">
<field name="VAR" id=":*fd/Bo(f:ATCCGKJ}JH">3.Advent</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="variables_set" id="J(UG]45ODnau9D*Az=5T">
<field name="VAR" id="91Vgs+A1!IH*8)FLq[|*">anzKerzen</field>
<value name="VALUE">
<block type="math_number" id="K;4*R*QP2?)wy*O@,Q{$">
<field name="NUM">3</field>
</block>
</value>
</block>
</statement>
<value name="IF2">
<block type="logic_operation" id="f8+2--nZ}%*pP0vLkTc@" inline="false">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="Nv4[qFhTBK.(X;a:q_tD">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id="Gwm(0!56w(YE%!M0iW!?">
<field name="VAR" id="#f7x64t.J#oVp/{DCrW[">heute</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="8N@#7JWE#F!aHF(v(iUx">
<field name="VAR" id=":*fd/Bo(f:ATCCGKJ}JH">3.Advent</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="F+_@Fe-ZbzJjbn@9JcL`">
<field name="OP">GTE</field>
<value name="A">
<block type="variables_get" id="e3c:U$q0mY7A%#/tS5f#">
<field name="VAR" id="#f7x64t.J#oVp/{DCrW[">heute</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="B8ai-rP;5R/2J.Zsd*cZ">
<field name="VAR" id="DJ]2D4_(GB-}%u8BgaOR">2.Advent</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO2">
<block type="variables_set" id="q-AUdvCoj($:@j^;:+_I">
<field name="VAR" id="91Vgs+A1!IH*8)FLq[|*">anzKerzen</field>
<value name="VALUE">
<block type="math_number" id="rZk9og`ll3S#irGOI}3v">
<field name="NUM">2</field>
</block>
</value>
</block>
</statement>
<value name="IF3">
<block type="logic_operation" id="xIsFj1lLRjsLrq^(We*d" inline="false">
<field name="OP">AND</field>
<value name="A">
<block type="logic_compare" id="xq9qAfCo[ir,^$|z-vwb">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id=":k4I!S-63kJ1rR$7$QDN">
<field name="VAR" id="#f7x64t.J#oVp/{DCrW[">heute</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="Vvt4tXM$,a1LiDbi!gEn">
<field name="VAR" id="DJ]2D4_(GB-}%u8BgaOR">2.Advent</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="HZ]8Rphzq6ie0)/vi5f:">
<field name="OP">GTE</field>
<value name="A">
<block type="variables_get" id="Q~sr:hDPtRb#f@M[4lfC">
<field name="VAR" id="#f7x64t.J#oVp/{DCrW[">heute</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="qUUjwS|B%bZ`c9,Xhryk">
<field name="VAR" id="v9@J:+ywDiYh/WJT^y5H">1.Advent</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO3">
<block type="variables_set" id="2?yM:E2YdNBB(zE;G]f1">
<field name="VAR" id="91Vgs+A1!IH*8)FLq[|*">anzKerzen</field>
<value name="VALUE">
<block type="math_number" id="_PI.P!;K,qEnkD@IIWuq">
<field name="NUM">1</field>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="LlDY0BS{?;IgfX,:B?Z#">
<field name="VAR" id="91Vgs+A1!IH*8)FLq[|*">anzKerzen</field>
<value name="VALUE">
<block type="math_number" id="Y?[_gQ/@Zq)u]F^R$,h[">
<field name="NUM">4</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_repeat_ext" id="Pk[.zHSO_u+$$$tsev%[">
<value name="TIMES">
<shadow type="math_number" id="[;Nx{z$tKh.Gdi7uXBuB">
<field name="NUM">0</field>
</shadow>
<block type="math_arithmetic" id="XwB4dc{B{BW4yl$.dW.#">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number" id="u|Ion,NSUiMHt*9!+]91">
<field name="NUM">4</field>
</shadow>
</value>
<value name="B">
<shadow type="math_number" id="IRtofGe^f4z$x;vXxEA_">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="lXEH0X(a:!B[pb[m+Ge/">
<field name="VAR" id="91Vgs+A1!IH*8)FLq[|*">anzKerzen</field>
</block>
</value>
</block>
</value>
<statement name="DO">
<block type="lists_getIndex" id="q#h9+7_06Jqg{TfI^-NB">
<mutation statement="true" at="false"></mutation>
<field name="MODE">REMOVE</field>
<field name="WHERE">RANDOM</field>
<value name="VALUE">
<block type="variables_get" id=";6oy2EDvu?om0C*^D+9^">
<field name="VAR" id="J8M20.815L}gHMmd0tGF">Kerzen</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="*dIUcHfsU:IfX}dpq8Rg">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="on_source" id="u-hs$|8V1Lw5Ey95L((`">
<field name="ATTR">state.val</field>
</block>
</value>
<statement name="DO0">
<block type="controls_forEach" id="R)c630V)mf7SK4]Le5Ic">
<field name="VAR" id="t4lD:i5d0zdWY#8S$EN)">Lichter</field>
<value name="LIST">
<block type="variables_get" id="x39au7w7l1AXl*G/GJ.D">
<field name="VAR" id="J8M20.815L}gHMmd0tGF">Kerzen</field>
</block>
</value>
<statement name="DO">
<block type="control_ex" id="4DOzICasV#S*]-A0|RfY">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">TRUE</field>
<value name="OID">
<shadow type="field_oid" id="lp_pQ_4%qgnP@84!X_Lc">
<field name="oid">Object ID</field>
</shadow>
<block type="variables_get" id="{4/]k4gQmKzKcPYbv@,c">
<field name="VAR" id="t4lD:i5d0zdWY#8S$EN)">Lichter</field>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="ZNT`79_jTXlI9gd|927g">
<field name="BOOL">TRUE</field>
</shadow>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="sq7b]fgKh1d7.2^;t;sV">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</statement>
</block>
</statement>
<value name="IF1">
<block type="logic_negate" id="4[O`?JCHUT+qVIfL6ZBz">
<value name="BOOL">
<block type="on_source" id="tju;u88,$$*~I:,~B5fy">
<field name="ATTR">state.val</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="controls_forEach" id="]8Swsn@YAWqMfuas5~~q">
<field name="VAR" id="t4lD:i5d0zdWY#8S$EN)">Lichter</field>
<value name="LIST">
<block type="selector" id="ii]n%]T%{@$rm~danwM!">
<field name="TEXT">state[id=*](functions=adventskerze)</field>
</block>
</value>
<statement name="DO">
<block type="control_ex" id="a*D|PMqd+byD_Jua0UHI">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">TRUE</field>
<value name="OID">
<shadow type="field_oid" id="lp_pQ_4%qgnP@84!X_Lc">
<field name="oid">Object ID</field>
</shadow>
<block type="variables_get" id="TqBeB+clo.%y~MOl,b{p">
<field name="VAR" id="t4lD:i5d0zdWY#8S$EN)">Lichter</field>
</block>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="[:Q73$R$#6cy^Q153,eN">
<field name="BOOL">FALSE</field>
</shadow>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="Z,1~iy%E*P:to7ZZ9Wj/">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</statement>
</block>
</statement>
<next>
<block type="debug" id="lfcO@DtD`Xlm0f0I?sj^" disabled="true">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="P}E6=huJ/nJ-J=+q5?]T">
<field name="TEXT">test</field>
</shadow>
<block type="variables_get" id="iPJcmH*5^FmmqwpH[#Jg">
<field name="VAR" id="t4lD:i5d0zdWY#8S$EN)">Lichter</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>