NEWS
Während Dusche, Handtuchheizung einschalten
-
Hallo,
vielleicht kann mir einer helfen habe eine Blockade.Ich möchte das eine Handtuchheizungtermostat hoch gestellt wird wenn einer Duscht.
Das ganze soll 30 minuten lang so bleiben.
Er soll aber nicht während den Timer, die ganze Zeit Temperatur befehle senden. Sondern nur zu Anfang und zum Ende.Der Start wird durch Feuchtigkeitantieg registriert..
Ich habe ein Script erstell, aber da blicke selbst ich nicht mehr durch
Ich haue es rein, damit keiner sagt ich habe mir keine Gedanken gemacht!
var timer_an_aus, heiz_an_timer, dusche_an, block_timer1, tempDifferenz, liste, heiz_timer; // Beschreibe diese Funktion … async function Stop_heizen() { (() => { if (heiz_timer) { clearInterval(heiz_timer); heiz_timer = null; }})(); heiz_an_timer = 0; timer_an_aus = false; if (getState('tuya.0.bf2d324fcc025f1ef4swea.2').val == 30) { setState('tuya.0.bf2d324fcc025f1ef4swea.2' /* temp_set */, 20.1); } } if (getState('0_userdata.0.Badezimmer.Timer_Badezimmer').val > 0) { timer_an_aus = true; } else { timer_an_aus = false; } setState('0_userdata.0.Badezimmer.Timer_an' /* Timer_an */, timer_an_aus, true); dusche_an = getState('0_userdata.0.Badezimmer.dusche_an').val; tempDifferenz = getState('0_userdata.0.Badezimmer.feuchtigkeits_diff').val; liste = []; (() => { if (heiz_timer) { clearInterval(heiz_timer); heiz_timer = null; }})(); heiz_an_timer = getState('0_userdata.0.Badezimmer.Timer_Badezimmer').val; on({ id: 'mqtt.0.Esp_gross.temp_wohnzimmer.Humidity' /* Esp_gross/temp wohnzimmer/Humidity */, change: 'any' }, async (obj) => { let value = obj.state.val; let oldValue = obj.oldState.val; (() => { if (heiz_timer) { clearInterval(heiz_timer); heiz_timer = null; }})(); liste.push(getState('mqtt.0.Esp_gross.temp_wohnzimmer.Humidity').val); if (liste.length >= 5) { liste.shift(); } tempDifferenz = liste.slice(-1)[0] - liste[0]; setState('0_userdata.0.Badezimmer.feuchtigkeits_diff' /* feuchtigkeits_diff */, tempDifferenz, true); setState('0_userdata.0.Badezimmer.Timer_an' /* Timer_an */, timer_an_aus, true); if (tempDifferenz > 4) { dusche_an = true; } else if (tempDifferenz < -4) { // Dusche zuende_es wurd gelüftet dusche_an = false; } else { dusche_an = false; } setState('0_userdata.0.Badezimmer.dusche_an' /* dusche_an */, dusche_an, true); // Setze Timer auf 0 und aus wenn 1800 sekunden an if (getState('0_userdata.0.Badezimmer.Timer_Badezimmer').val <= 1800 && getState('0_userdata.0.Badezimmer.Timer_Badezimmer').val >= 1) { timer_an_aus = true; } else if (getState('0_userdata.0.Badezimmer.Timer_Badezimmer').val == 0 || heiz_an_timer == 0) { (() => { if (heiz_timer) { clearInterval(heiz_timer); heiz_timer = null; }})(); timer_an_aus = false; } else { timer_an_aus = false; heiz_an_timer = 0; } if (timer_an_aus || dusche_an) { if (heiz_an_timer >= 1800) { await Stop_heizen(); } else if (false) { } else { timer_an_aus = true; if (getState('tuya.0.bf2d324fcc025f1ef4swea.2').val == 20.1) { setState('tuya.0.bf2d324fcc025f1ef4swea.2' /* temp_set */, 30); } } (() => { if (heiz_timer) { clearInterval(heiz_timer); heiz_timer = null; }})(); heiz_timer = setInterval(async () => { timer_an_aus = true; heiz_an_timer = (typeof heiz_an_timer === 'number' ? heiz_an_timer : 0) + 1; setState('0_userdata.0.Badezimmer.Timer_Badezimmer' /* Timer_Badezimmer */, heiz_an_timer, true); }, 1000); // dsadas } else if (false) { } else { if (getState('tuya.0.bf2d324fcc025f1ef4swea.2').val == 30) { setState('tuya.0.bf2d324fcc025f1ef4swea.2' /* temp_set */, 20.1); } } setState('0_userdata.0.Badezimmer.Timer_Badezimmer' /* Timer_Badezimmer */, heiz_an_timer, true); }); ```
-
@nicoloma sagte: da blicke selbst ich nicht mehr durch
Kein Wunder, denn es ist viel zu kompliziert.
Exportiere mal das Blockly und poste den XML-Code in Code tags. -
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</variable> <variable id="YUa0(J+Yz1jv$b,HAJnV">heiz_an_timer</variable> <variable id="k{urv5:d*$21r3^eU1uH">dusche_an</variable> <variable id="G!7EQIfOiucgzA?bY2!+">block_timer1</variable> <variable id="m!T2C{3jG}C2+mFo{{+t">tempDifferenz</variable> <variable id="C4=te:_+4!*#?$$i`FMI">liste</variable> <variable type="interval" id="heiz_timer">heiz_timer</variable> </variables> <block type="controls_if" id="y}Ujjr5kE+_*BoS/FN?E" x="-637" y="-349"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="RL(eglY5cWGUwh:T[7EZ"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id=":pjn]+[z)0voDz+L@aBj"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Badezimmer.Timer_Badezimmer</field> </block> </value> <value name="B"> <block type="math_number" id="#(#SR:Kk.LPuQM(%T%(["> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="C/SfZ3lQ~}A4[V``E*=;"> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> <value name="VALUE"> <block type="logic_boolean" id="lZ7-xSSSpT?kHtXljW}l"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="%e0af})/=I{5kL+MG2bi"> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> <value name="VALUE"> <block type="logic_boolean" id="e7*Hm`v:*ge/+SCis?x6"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> <next> <block type="update" id="9LL.L*J}Xr70CmO*E6[T"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Badezimmer.Timer_an</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="^%F-Wf#KyThw?WRm=f/4"> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> </block> </value> <next> <block type="variables_set" id="*8o}a($+Jq37{Hqnf09q"> <field name="VAR" id="k{urv5:d*$21r3^eU1uH">dusche_an</field> <value name="VALUE"> <block type="get_value" id="RWu?Ij;l/Q~l!S|:~G.:"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Badezimmer.dusche_an</field> </block> </value> <next> <block type="variables_set" id="-GBv{H?tO,H}*Dz_YiPD"> <field name="VAR" id="m!T2C{3jG}C2+mFo{{+t">tempDifferenz</field> <value name="VALUE"> <block type="get_value" id="w6x;Bpn|*#Y5[4Q8!J)F"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Badezimmer.feuchtigkeits_diff</field> </block> </value> <next> <block type="variables_set" id="r8t.SQ@@vfv1qBai(dR@"> <field name="VAR" id="C4=te:_+4!*#?$$i`FMI">liste</field> <value name="VALUE"> <block type="lists_create_with" id="F81YYU`J?1AJ50rRF.bp"> <mutation items="0"></mutation> </block> </value> <next> <block type="timeouts_clearinterval" id="2ycD2ZpB:I1._8!(?w]T"> <field name="NAME">heiz_timer</field> <next> <block type="variables_set" id="AQ_d!Qwhtcb)[9-jl951"> <field name="VAR" id="YUa0(J+Yz1jv$b,HAJnV">heiz_an_timer</field> <value name="VALUE"> <block type="get_value" id="#8BOo~PcVL}_4)BsKZ_u"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Badezimmer.Timer_Badezimmer</field> </block> </value> <next> <block type="on" id="=3436}WLW?~-c.9%gYf`"> <field name="OID">mqtt.0.Esp_gross.temp_wohnzimmer.Humidity</field> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="timeouts_clearinterval" id="w?v%_-q@La|qnDA9a844"> <field name="NAME">heiz_timer</field> <next> <block type="lists_setIndex" id="(.,LUkXDr+Q^{oZ!}..n"> <mutation at="false"></mutation> <field name="MODE">INSERT</field> <field name="WHERE">LAST</field> <value name="LIST"> <block type="variables_get" id="_iynJ_0%aO`/HA_^@U$|"> <field name="VAR" id="C4=te:_+4!*#?$$i`FMI">liste</field> </block> </value> <value name="TO"> <block type="get_value" id="=9*16]1))KJ4Eb{D(k{F"> <field name="ATTR">val</field> <field name="OID">mqtt.0.Esp_gross.temp_wohnzimmer.Humidity</field> </block> </value> <next> <block type="controls_if" id="D~:?H0_x*C{kk!wvmqTl"> <value name="IF0"> <block type="logic_compare" id="-yRnKAY/)Qsg[I|I~g/Q"> <field name="OP">GTE</field> <value name="A"> <block type="lists_length" id="Ug@_~h+XD.yA+sLUrz39"> <value name="VALUE"> <block type="variables_get" id="#c1}Oe[2lH~1{[U/8b/X"> <field name="VAR" id="C4=te:_+4!*#?$$i`FMI">liste</field> </block> </value> </block> </value> <value name="B"> <block type="math_number" id="U%Bl_`KVXBstplm}E:lf"> <field name="NUM">5</field> </block> </value> </block> </value> <statement name="DO0"> <block type="lists_getIndex" id="e#w~fan2/~5rwgIvoU7j"> <mutation statement="true" at="false"></mutation> <field name="MODE">REMOVE</field> <field name="WHERE">FIRST</field> <value name="VALUE"> <block type="variables_get" id="VA$G%~OlNxs,0j0O|4~f"> <field name="VAR" id="C4=te:_+4!*#?$$i`FMI">liste</field> </block> </value> </block> </statement> <next> <block type="variables_set" id="DhaqVe*A(qLOm3nJl|^8"> <field name="VAR" id="m!T2C{3jG}C2+mFo{{+t">tempDifferenz</field> <value name="VALUE"> <block type="math_arithmetic" id="z@mk|1g(?zYkPgJ,`+^."> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="5!XE|7=}49x?o=zsCs?F"> <field name="NUM">1</field> </shadow> <block type="lists_getIndex" id="4!e31@x+ld1qjw;FTcGQ"> <mutation statement="false" at="false"></mutation> <field name="MODE">GET</field> <field name="WHERE">LAST</field> <value name="VALUE"> <block type="variables_get" id="byHCG?p2J}EQ.=(pQ1~8"> <field name="VAR" id="C4=te:_+4!*#?$$i`FMI">liste</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="/P%TSO:}^85VloVh8r(B"> <field name="NUM">1</field> </shadow> <block type="lists_getIndex" id="Xgqwkvd0%GQN6]=@SR?0"> <mutation statement="false" at="false"></mutation> <field name="MODE">GET</field> <field name="WHERE">FIRST</field> <value name="VALUE"> <block type="variables_get" id="VY:ky0a#G8c{4bT.[OP~"> <field name="VAR" id="C4=te:_+4!*#?$$i`FMI">liste</field> </block> </value> </block> </value> </block> </value> <next> <block type="update" id="9}2[}rOmRc@n5-({*Y$e"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Badezimmer.feuchtigkeits_diff</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="M}mZ8v2#JIr,:q:v3/Zb"> <field name="VAR" id="m!T2C{3jG}C2+mFo{{+t">tempDifferenz</field> </block> </value> <next> <block type="update" id="C1y?ukyQB?pdq-o~rJ,s"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Badezimmer.Timer_an</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="_,bsgt.fsX3HoPZ,bG)d"> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> </block> </value> <next> <block type="controls_if" id="Y2G.j7o+lExReGJX{L8/"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="UQ#p;i+XpK7q?w7CT7d5" inline="false"> <field name="OP">GT</field> <value name="A"> <block type="variables_get" id=":xL;I_83n`HV40)1wxx8"> <field name="VAR" id="m!T2C{3jG}C2+mFo{{+t">tempDifferenz</field> </block> </value> <value name="B"> <block type="math_number" id="(tRF9mq^FChM6(?wB9v3"> <field name="NUM">4</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="px/w45?,OuJ07_SrP*H4"> <field name="VAR" id="k{urv5:d*$21r3^eU1uH">dusche_an</field> <value name="VALUE"> <block type="logic_boolean" id="KEkuKLsD{0[wNU,-cHV!"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> <value name="IF1"> <block type="logic_compare" id="k;e;ks$]d,V7yhZ7gD6N" inline="false"> <field name="OP">LT</field> <value name="A"> <block type="variables_get" id="cd~#X?@H0,DGjWQRnnHL"> <field name="VAR" id="m!T2C{3jG}C2+mFo{{+t">tempDifferenz</field> </block> </value> <value name="B"> <block type="math_number" id="]K}Y!uF]?AFo9`dH]67F"> <field name="NUM">-4</field> </block> </value> </block> </value> <statement name="DO1"> <block type="comment" id="u.%)g5HsbeS%l*V#3+qB"> <field name="COMMENT">Dusche zuende_es wurd gelüftet</field> <next> <block type="variables_set" id="*op|a;%^~(hB$^SJ%UDk"> <field name="VAR" id="k{urv5:d*$21r3^eU1uH">dusche_an</field> <value name="VALUE"> <block type="logic_boolean" id="2qoOURaGDc29C|CJc.6/"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="b!ZtkV38/4Csd@(y~]Z-"> <field name="VAR" id="k{urv5:d*$21r3^eU1uH">dusche_an</field> <value name="VALUE"> <block type="logic_boolean" id="CwYB7+QGW{0}CKS4Bw%8"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> <next> <block type="debug" id="{v_P^e!vmg/,jl).?t$g" disabled="true"> <field name="Severity">error</field> <value name="TEXT"> <shadow type="text" id="7sstB/Tj$%]n,71NE%4@"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="yn7u9N*XQ#:m_hJ}I?Z["> <field name="VAR" id="k{urv5:d*$21r3^eU1uH">dusche_an</field> </block> </value> <next> <block type="update" id="KQ@D|~!qh5DVRf1T4QAs"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Badezimmer.dusche_an</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="Y3@5-S6i,@~E5_UV-@~]"> <field name="VAR" id="k{urv5:d*$21r3^eU1uH">dusche_an</field> </block> </value> <next> <block type="debug" id="9[A8RHBuK9C7(CjYsv1)" collapsed="true" disabled="true"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text" id="ffNm4A%)!%3?-L5=N8p#"> <field name="TEXT">test</field> </shadow> <block type="get_value" id="G0FJIHibRHZXk0INrT!G"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Badezimmer.Timer_Badezimmer</field> </block> </value> <next> <block type="debug" id="C]|R$IM~z%vB*3-.FgLD" disabled="true"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="7sstB/Tj$%]n,71NE%4@"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="/F11daBSG,_=r}~f/*[("> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> </block> </value> <next> <block type="comment" id="oWZ,asic)[u.{E0Kr^`a"> <field name="COMMENT">Setze Timer auf 0 und aus wenn 1800 sekunden an</field> <next> <block type="controls_if" id="a#-)(`_@Zp[0PUXs~;~8"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="E/4#6`hFuy?`N626:g{f" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="X+#SrT_Gnoj;p-kn~7tl"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="g85MuYUv{`{Lx,Lv2Mg-"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Badezimmer.Timer_Badezimmer</field> </block> </value> <value name="B"> <block type="math_number" id="~:^1Eflfyi5`s0B#(!0:"> <field name="NUM">1800</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="rd`Gx0qu+pWl]O%yVWVI"> <field name="OP">GTE</field> <value name="A"> <block type="get_value" id="+:l~yTb=NkVp@ZSOt93%"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Badezimmer.Timer_Badezimmer</field> </block> </value> <value name="B"> <block type="math_number" id="r%}Zp;Uwc/Nd[=d#w;A0"> <field name="NUM">1</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="x:h4_{fdxFVuW^frO8qT"> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> <value name="VALUE"> <block type="logic_boolean" id="mud]+!+GZ.y7T,7FFr%j"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> <value name="IF1"> <block type="logic_operation" id="WD#n}%%X6UkY2yy%sJ,f"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="6O)1MiB@8D/fb_-8s+Le"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="`}[L2_rC_;K$a,3ZPlcV"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Badezimmer.Timer_Badezimmer</field> </block> </value> <value name="B"> <block type="math_number" id="-`G3p+e]FsUH:)~~}Q{6"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="AGa$m(*~kQtdCy(Jr;Q#"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="+3X/ZIGl[S5Hyej-`JfS"> <field name="VAR" id="YUa0(J+Yz1jv$b,HAJnV">heiz_an_timer</field> </block> </value> <value name="B"> <block type="math_number" id="TV`$3~McX4Q0LXqKG/UC"> <field name="NUM">0</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="timeouts_clearinterval" id="W$#!+|u5+T2,LIHDs*]X"> <field name="NAME">heiz_timer</field> <next> <block type="variables_set" id="_f5F.0{s$4V`XHZ^BG0U"> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> <value name="VALUE"> <block type="logic_boolean" id="!4r1`-=L%U,L/!4sCt6f"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="3@^K]j-j;ft3[w4+fw`D"> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> <value name="VALUE"> <block type="logic_boolean" id="9KeLpUXS4tLq;a%5F4x/"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="variables_set" id="J:FLiT6Cb5Oxs~+?*.UT"> <field name="VAR" id="YUa0(J+Yz1jv$b,HAJnV">heiz_an_timer</field> <value name="VALUE"> <block type="math_number" id="Qlti(`[f;rhQEOjj[uDj"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> <next> <block type="controls_if" id="wS?Vj~b3DY6MQn#BoBX+"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="T%:F!ybSL3DB+ky_?5(V"> <field name="OP">OR</field> <value name="A"> <block type="variables_get" id="oz2,k;1~(@dh)$D_AE%m"> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> </block> </value> <value name="B"> <block type="variables_get" id="uv2:Zc!ieyN]Z$UAnQkc"> <field name="VAR" id="k{urv5:d*$21r3^eU1uH">dusche_an</field> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="f=g,HJ`9Dkc$=CoDk^`n"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="!D0G2x[,UhkmMR?5?z%b"> <field name="OP">GTE</field> <value name="A"> <block type="variables_get" id="5!?Yi]8MJY1syV3H_K7!"> <field name="VAR" id="YUa0(J+Yz1jv$b,HAJnV">heiz_an_timer</field> </block> </value> <value name="B"> <block type="math_number" id="HoagxsfX3z{Vi)ujti;J"> <field name="NUM">1800</field> </block> </value> </block> </value> <statement name="DO0"> <block type="procedures_callnoreturn" id="LpV8;*1i~JE4vO!_jZP#"> <mutation name="Stop_heizen"></mutation> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="=.uG8oOOgq0XQ^o|z6_D"> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> <value name="VALUE"> <block type="logic_boolean" id="?THLi3F0]9(qX)fhLGMs"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="update" id="G-{Y}{1p7+Fi}v^[}N$z" disabled="true"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">tuya.0.bf2d324fcc025f1ef4swea.2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="iPRoy;$c[aikdVz4ojjc"> <field name="NUM">30</field> </block> </value> <next> <block type="controls_if" id="=1y]o$`O?S{HmT4wXdcf"> <value name="IF0"> <block type="logic_compare" id="j/thX%|3J?BXDRE{NyQB"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="+L3b`.vtY9dBjG~a?yzx"> <field name="ATTR">val</field> <field name="OID">tuya.0.bf2d324fcc025f1ef4swea.2</field> </block> </value> <value name="B"> <block type="math_number" id="8rS9G4:x{weQ@lLd{zam"> <field name="NUM">20.1</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="2L!,#^1Y$f`x^r2z`z{S"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">tuya.0.bf2d324fcc025f1ef4swea.2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="|Rymy)kvioqTh.,hi)S~"> <field name="NUM">30</field> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </statement> <next> <block type="timeouts_clearinterval" id="it9I1FuPb-YLN9)eGVGj"> <field name="NAME">heiz_timer</field> <next> <block type="timeouts_setinterval" id=")DCko/rL6NjZ0+HHyX@H"> <field name="NAME">heiz_timer</field> <field name="INTERVAL">1</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="variables_set" id="MXN(xlU2:O]it/uL]DqJ"> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> <value name="VALUE"> <block type="logic_boolean" id="3=5t{HoWSBN{t:2E?|:!"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="math_change" id="y`O0tes!Z3A|VE(/5lGc"> <field name="VAR" id="YUa0(J+Yz1jv$b,HAJnV">heiz_an_timer</field> <value name="DELTA"> <shadow type="math_number" id="ANCfoU/v0j!_vv*?),G?"> <field name="NUM">1</field> </shadow> <block type="math_number" id="dG4cuG_m2Fk#HyCA(|NR"> <field name="NUM">1</field> </block> </value> <next> <block type="update" id="+6f0[V5fh}Y@{ovyc^az"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Badezimmer.Timer_Badezimmer</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="|dT@BHeL;aApN6eY_J,,"> <field name="VAR" id="YUa0(J+Yz1jv$b,HAJnV">heiz_an_timer</field> </block> </value> </block> </next> </block> </next> </block> </statement> <next> <block type="comment" id="$`^{/(x!j?Re.XU!TcbY"> <field name="COMMENT">dsadas</field> </block> </next> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_negate" id="/@HvRn`byvBN|[s~2+qo" disabled="true"> <value name="BOOL"> <block type="variables_get" id="/AmJ-s?L_^2)X=b7yqX?"> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> </block> </value> </block> </value> <statement name="DO1"> <block type="timeouts_clearinterval" id="B136.Zk0=)dZ^FRB?q2A" disabled="true"> <field name="NAME">heiz_timer</field> </block> </statement> <statement name="ELSE"> <block type="controls_if" id="@CU~X61P8x}MQCcdEeRN"> <value name="IF0"> <block type="logic_compare" id="TGjM7_]x+_fug)zuy[()"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="OIT4brLcHpdS,/KKvmS^"> <field name="ATTR">val</field> <field name="OID">tuya.0.bf2d324fcc025f1ef4swea.2</field> </block> </value> <value name="B"> <block type="math_number" id=";Bp,:5A(?gCv99_^yqW)"> <field name="NUM">30</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="5f.@]AGm}tny;$]c;itg"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">tuya.0.bf2d324fcc025f1ef4swea.2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="o=p=I)HQFrWDz5vQn,[G"> <field name="NUM">20.1</field> </block> </value> </block> </statement> </block> </statement> <next> <block type="update" id="O+}ll3|DgjT}::b*VD`l"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Badezimmer.Timer_Badezimmer</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="Lc_y6*F)bb9L,Glz:^/!"> <field name="VAR" id="YUa0(J+Yz1jv$b,HAJnV">heiz_an_timer</field> </block> </value> </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> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> <block type="update" id="6FMGBDnU[@lJ;:P)O#*f" disabled="true" x="-37" y="-212"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Badezimmer.Timer_Badezimmer</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="_vH@ozJNgEF/vnhHG^f@"> <field name="VAR" id="YUa0(J+Yz1jv$b,HAJnV">heiz_an_timer</field> </block> </value> </block> <block type="on_ext" id="lJL!,IPb3Msxa$]eAhu:" disabled="true" x="263" y="-137"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">gt</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="yhB223KLuz_.s#9qSmuu"> <field name="oid">0_userdata.0.Badezimmer.dusche_an</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="HOH[ZO!/LsEjG}FUmzIc"> <value name="IF0"> <block type="variables_get" id="m%@%S$B,%f.(F41#Z/g8"> <field name="VAR" id="G!7EQIfOiucgzA?bY2!+">block_timer1</field> </block> </value> </block> </statement> </block> <block type="logic_negate" id="|*bzgKhZe}mZFl3yJNm4" disabled="true" x="662" y="-62"></block> <block type="procedures_defnoreturn" id="u7V1g0S71sA0oxy]v,XJ" disabled="true" x="613" y="13"> <field name="NAME">timer</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> <block type="procedures_defnoreturn" id="D-8w/%Ws6+S=*7+N(9-U" x="12" y="1138"> <field name="NAME">Stop_heizen</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="timeouts_clearinterval" id="0t=]mztKBNoG+F}#t@5j"> <field name="NAME">heiz_timer</field> <next> <block type="variables_set" id="G6:Yt2E]%KNJ1gN6#7IU"> <field name="VAR" id="YUa0(J+Yz1jv$b,HAJnV">heiz_an_timer</field> <value name="VALUE"> <block type="math_number" id="f3H[~@T{WIhVZ0Pi[E6|"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="75l3R8$:gJ1(l[L#+jB%"> <field name="VAR" id="nFaszOE_N_;S0AIaL!^7">timer_an_aus</field> <value name="VALUE"> <block type="logic_boolean" id="$?FXySZs_xXoG@X,+r,T"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="update" id="By^bTKjkpQ/0.x+~6FH*" disabled="true"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">tuya.0.bf2d324fcc025f1ef4swea.2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="JEGb|tblIyG,cwZ^Csx#"> <field name="NUM">20</field> </block> </value> <next> <block type="controls_if" id="XnT7;|/-VK#fEVQwa6m6"> <value name="IF0"> <block type="logic_compare" id="!n)Z_k4j`)c^AEtTv~q5"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="~8j0k)r@0pOzBxx7}uoT"> <field name="ATTR">val</field> <field name="OID">tuya.0.bf2d324fcc025f1ef4swea.2</field> </block> </value> <value name="B"> <block type="math_number" id="@Bh{1aiX(by|sg,=6NF_"> <field name="NUM">30</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="Gw-J.hvUKDlu~b3!P{Fx"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">tuya.0.bf2d324fcc025f1ef4swea.2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="A[n5]MB~@og|=hsUH`Ak"> <field name="NUM">20.1</field> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </xml>
-
@nicoloma
Versuche es mal so: -
@paul53 Boah Paul!!!! Klasse,
ich probiere es sofort aus... Wie hast du das so schnell geschafft... Warnsinn!