<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="_o(A;@hO^Y!0l@!%+U[U">Groesse_Hausspeicher_in_Wh</variable>
<variable id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</variable>
<variable id="tUKE0PX3K5)VD=YNcLvD">userSoc</variable>
<variable id="662+@SNN1=iL4}c|%OCB">Gewünschte Volladung der Batterie in %</variable>
<variable id="7%%2=ua6TF*_3*n=+KFP">ladung</variable>
<variable id="i!o.-Ha)p18KJmC7sy:z">stunde</variable>
<variable id="2]{L:*:~P%K~o/VBmsiG">start1h</variable>
<variable id="W81ft)h|Zh*R-R*?Fb?/">start2h</variable>
<variable id="-^A9hW=83#~9i72OlX=6">Hausspeicher_User_Soc_in%</variable>
<variable id="ML@$Lt_]|-r%{#NpcuTc">Gewünschte Volladung des Hausspeichers in Wh</variable>
<variable id="i.}R%W]BfZO,N3SI9H@(">Aktueller Inhalt des Hausspeichers in Wh</variable>
<variable id="8%;!XNXHU4)/mq1Q{26l">benoetigte_Wh_fuer_Vollladung</variable>
</variables>
<block type="on_ext" id="!:S,u%F%,D|^qI+fx8+7" x="913" y="-62">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="`}o+tiQuWh+V$coUrcqd">
<field name="oid">default</field>
</shadow>
<block type="text" id="u6A}Mf}c?SsdQ$-NSY|Q">
<field name="TEXT">sonnen.0.status.userSoc</field>
</block>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="2i;.un?=k!HN(E#9_S}{">
<value name="IF0">
<block type="get_value" id="_[9Nyawe!,B~3YiY`6B*">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.SB_10_manuell_laden</field>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id=",ve{v3}#7O$OVB;qf4b3">
<field name="VAR" id="tUKE0PX3K5)VD=YNcLvD">userSoc</field>
<value name="VALUE">
<block type="on_source" id="=Nyl81_dezLL_9N^QooF">
<field name="ATTR">state.val</field>
</block>
</value>
<next>
<block type="controls_if" id="S[wO/T])mRy4l-TM9G~]">
<mutation else="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="2f4p(u=}(=K%7M%4r^T,">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id="Q)@yXE3VuEJmeqc!iI]3">
<field name="VAR" id="tUKE0PX3K5)VD=YNcLvD">userSoc</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="zR1p/~~]}.J]ql^Q9C.j">
<field name="VAR" id="662+@SNN1=iL4}c|%OCB">Gewünschte Volladung der Batterie in %</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="controls_if" id="qb(ZsyG;/ctpEs%AgIhu">
<mutation else="1"></mutation>
<value name="IF0">
<block type="logic_operation" id="WR,do8bkYb4;$b0d0ZRz" inline="false">
<field name="OP">OR</field>
<value name="A">
<block type="logic_compare" id="+)8PQPUGZ:f^FSo.X8XH">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id="H.`T3QRHnKeW8/r[|Z_X">
<field name="VAR" id="tUKE0PX3K5)VD=YNcLvD">userSoc</field>
</block>
</value>
<value name="B">
<block type="math_number" id="]M3DjmiXpy??;HfY3IRA">
<field name="NUM">5</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="#hzl#oPN@kR$Vml(Mb=-">
<field name="OP">GT</field>
<value name="A">
<block type="variables_get" id="`@hXr^ZK`egjbYkULC%E">
<field name="VAR" id="tUKE0PX3K5)VD=YNcLvD">userSoc</field>
</block>
</value>
<value name="B">
<block type="math_number" id="CZTTbH4U%.tnZndUo?)-">
<field name="NUM">95</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="i?5`%cy!H,*)mre5DN,g">
<field name="VAR" id="7%%2=ua6TF*_3*n=+KFP">ladung</field>
<value name="VALUE">
<block type="math_arithmetic" id="0R*gz0*U~M)o$]a@aH3^">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="NRSK%SF9*$IrZJK5O+?W">
<field name="VAR" id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</field>
</block>
</value>
<value name="B">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="math_number" id=":Yi=O@m`xRWa=P-q=xW)">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="bRNS:q59Ud-z?;Z?q:6|">
<field name="VAR" id="7%%2=ua6TF*_3*n=+KFP">ladung</field>
<value name="VALUE">
<block type="variables_get" id="T79bP^WCXStAdTBj{KVH">
<field name="VAR" id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
<statement name="ELSE">
<block type="update" id="d3zagXK[uKqXL~AVHIl+">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.SB_10_manuell_laden</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="HqS~dS}s![:3!na`{LE|">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="variables_set" id="$grJ9zwL;,f|c:%(i4iO">
<field name="VAR" id="7%%2=ua6TF*_3*n=+KFP">ladung</field>
<value name="VALUE">
<block type="math_number" id="54W^ln.jYu|z27??![pW">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</statement>
<next>
<block type="schedule" id="HswSC2x#x@q*V16btQTB">
<field name="SCHEDULE">*/8 * * * * *</field>
<statement name="STATEMENT">
<block type="control" id="{Vq?}rT:I^wT${3(H3+.">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">sonnen.0.control.charge</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="variables_get" id="n7~aIw=1}rs5#-lK+@V3">
<field name="VAR" id="7%%2=ua6TF*_3*n=+KFP">ladung</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
<block type="variables_set" id="MZP??-@GgCQ0uW}:EOVg" x="87" y="194">
<field name="VAR" id="_o(A;@hO^Y!0l@!%+U[U">Groesse_Hausspeicher_in_Wh</field>
<value name="VALUE">
<block type="math_number" id="o8-buWU0G_HoI4}4;evH">
<field name="NUM">5000</field>
</block>
</value>
<next>
<block type="variables_set" id="(S#.kljR#zd~`f9RB(yq">
<field name="VAR" id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</field>
<value name="VALUE">
<block type="math_number" id="Zu?;iFSO1mu1EKv/TXIl">
<field name="NUM">3000</field>
</block>
</value>
<next>
<block type="variables_set" id="GKzOcYV_*aI#z-DvQM-l">
<field name="VAR" id="662+@SNN1=iL4}c|%OCB">Gewünschte Volladung der Batterie in %</field>
<value name="VALUE">
<block type="math_number" id="~rqaOR`YtTkL*2N]d]Pb">
<field name="NUM">100</field>
</block>
</value>
<next>
<block type="schedule" id="PpHw,4;Y%c+B0c_2!yvm">
<field name="SCHEDULE">0 0-5,19-23 * * *</field>
<statement name="STATEMENT">
<block type="variables_set" id="+CObYKOl:duuBTJwO?fN">
<field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
<value name="VALUE">
<block type="time_get" id="{7CG2P6msM+sg=DI/Ib*">
<mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
<field name="OPTION">h</field>
</block>
</value>
<next>
<block type="variables_set" id=";w9ec0563t3N?#;PR6lg">
<field name="VAR" id="2]{L:*:~P%K~o/VBmsiG">start1h</field>
<value name="VALUE">
<block type="get_value" id="+edqU(uyzR7C!in:@y!m">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Tibber.Bester_Preis.Start1h</field>
</block>
</value>
<next>
<block type="variables_set" id="}/(:p1v0{D5D)^a^_7eM">
<field name="VAR" id="W81ft)h|Zh*R-R*?Fb?/">start2h</field>
<value name="VALUE">
<block type="get_value" id="_)S5(r}hvt!234ABX7Lj">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.Tibber.Bester_Preis.Start2h</field>
</block>
</value>
<next>
<block type="controls_if" id="V^C-W~Z]9ve.tu:OK[{b">
<value name="IF0">
<block type="logic_operation" id=",s,PDs0@SsAH+2PG[P2^" inline="false">
<field name="OP">AND</field>
<value name="A">
<block type="logic_operation" id="[Em}#@0oLHmA_`E|F34W">
<field name="OP">OR</field>
<value name="A">
<block type="logic_compare" id="4,c|9~-qXY=toW32Ju)#">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="b{gm}vW!jZgpF^){AEia">
<field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="7(h*]j;D}wA9b^Oiq!66">
<field name="VAR" id="2]{L:*:~P%K~o/VBmsiG">start1h</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="=NSBA(Vb)IIYp.vkf^;B">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="N@`O)}08SBDD7T9fhJWo">
<field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
</block>
</value>
<value name="B">
<block type="variables_get" id=":AwViRZ{e7#a8N4Vw=r1">
<field name="VAR" id="W81ft)h|Zh*R-R*?Fb?/">start2h</field>
</block>
</value>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_negate" id="Q/R*]xz%tp{@9@qvYxJJ">
<value name="BOOL">
<block type="get_value" id="wp[}xVYrx(%|;LlRFs,%">
<field name="ATTR">val</field>
<field name="OID">0_userdata.0.SB_10_manuell_laden</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="comment" id="?{,$;?Kz_31x-o=h1qXF">
<field name="COMMENT">Hausspeicher aktueller User Soc Datenpunkt (diese Variable wird leider unten in der Ausführung nicht übernommen, daher muß man sie unten manuell eingeben)</field>
<next>
<block type="variables_set" id="!70`ha%X:wSKw!l4tfT0">
<field name="VAR" id="-^A9hW=83#~9i72OlX=6">Hausspeicher_User_Soc_in%</field>
<value name="VALUE">
<block type="get_value" id="M~|s)d7rGJAty~MxH`GT">
<field name="ATTR">val</field>
<field name="OID">sonnen.0.status.userSoc</field>
</block>
</value>
<next>
<block type="variables_set" id="aT316iyC~O^.QPGm#usj">
<field name="VAR" id="ML@$Lt_]|-r%{#NpcuTc">Gewünschte Volladung des Hausspeichers in Wh</field>
<value name="VALUE">
<block type="math_arithmetic" id="L,d!WkA(ZTF?rMk*gX|:">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="Y?ptK9X2+dF|Q6oNZfa;">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="Y[a`=E?0,0EU%,*`|@PL">
<field name="VAR" id="_o(A;@hO^Y!0l@!%+U[U">Groesse_Hausspeicher_in_Wh</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="D:Q_eDfS0$0eFkE.s~d9">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="h+AE0hEXUMZzgS/(PqHw">
<field name="VAR" id="662+@SNN1=iL4}c|%OCB">Gewünschte Volladung der Batterie in %</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="math_number" id=".q-.W`ppE=W6~U,G[M{G">
<field name="NUM">100</field>
</block>
</value>
</block>
</value>
<next>
<block type="debug" id="}G,+oeAzYOWBp`(;iE/L">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text">
<field name="TEXT">test</field>
</shadow>
<block type="variables_get" id="@ylEhTd*p|@Qpf9DO01~">
<field name="VAR" id="ML@$Lt_]|-r%{#NpcuTc">Gewünschte Volladung des Hausspeichers in Wh</field>
</block>
</value>
<next>
<block type="variables_set" id="QpSp*L2/obVl#BmPW=Im">
<field name="VAR" id="i.}R%W]BfZO,N3SI9H@(">Aktueller Inhalt des Hausspeichers in Wh</field>
<value name="VALUE">
<block type="math_arithmetic" id="4yEqQ!XOBu/CM1z55rZ+">
<field name="OP">DIVIDE</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="math_arithmetic" id="NOV4:y,hKM_4WGK+-L5a">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="@@bf!^!!zG3ZazhhDi3N">
<field name="VAR" id="_o(A;@hO^Y!0l@!%+U[U">Groesse_Hausspeicher_in_Wh</field>
</block>
</value>
<value name="B">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="r8^7W*S+mf8?Y+^iCEu^">
<field name="VAR" id="-^A9hW=83#~9i72OlX=6">Hausspeicher_User_Soc_in%</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
<block type="math_number" id="z=X5B0F%iKCu_{K=nTtz">
<field name="NUM">100</field>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="GcnkwY=Av#fEW9`j_(LA">
<field name="VAR" id="8%;!XNXHU4)/mq1Q{26l">benoetigte_Wh_fuer_Vollladung</field>
<value name="VALUE">
<block type="math_arithmetic" id="BC:,rAc!m7F!HG_H?a`.">
<field name="OP">MINUS</field>
<value name="A">
<shadow type="math_number" id="ZEU-dcK#.OUwTR%xlpL!">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id="znl~Q@O?I@#g8i;LBO3F">
<field name="VAR" id="ML@$Lt_]|-r%{#NpcuTc">Gewünschte Volladung des Hausspeichers in Wh</field>
</block>
</value>
<value name="B">
<shadow type="math_number" id="`6.:,gs|}r;|)i=WOM)q">
<field name="NUM">1</field>
</shadow>
<block type="variables_get" id=".aFs`RGDYOQiyNOnEq,s">
<field name="VAR" id="i.}R%W]BfZO,N3SI9H@(">Aktueller Inhalt des Hausspeichers in Wh</field>
</block>
</value>
</block>
</value>
<next>
<block type="debug" id="U-5c]Rj@%|q4-iR)n$GK">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="0/@w@_4bKtO[4-@JL/bx">
<field name="TEXT">test</field>
</shadow>
<block type="variables_get" id="sQjcbO4t8x}*ph/08A42">
<field name="VAR" id="8%;!XNXHU4)/mq1Q{26l">benoetigte_Wh_fuer_Vollladung</field>
</block>
</value>
<next>
<block type="controls_if" id="Dv{j+@Ao0zX4F,q.:#[=">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="J4doY.kF$c~7WO6$@Zl]">
<field name="OP">GTE</field>
<value name="A">
<block type="variables_get" id="gJz6kkTqUqfp]]%bVxmK">
<field name="VAR" id="8%;!XNXHU4)/mq1Q{26l">benoetigte_Wh_fuer_Vollladung</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="aigO*jWNOUWw.2d4z`y}">
<field name="VAR" id="p*yERo]2-$0,t=p+lkg8">Beladeleistung_Hausspeicher_in_Watt</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="controls_if" id=")`YJ^)aGk6A+l]oCX9@g">
<value name="IF0">
<block type="logic_compare" id="1kL5O,FD^1AF~Ui^-?N%">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="YTv05lus(j-!otQ,RA0l">
<field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="+nauxomT!BzcChx*43Gu">
<field name="VAR" id="W81ft)h|Zh*R-R*?Fb?/">start2h</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="update" id=")`oTB=*R-ng3gjG-q5ZH">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.SB_10_manuell_laden</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id=",je=plC@|,)bhNC|FHQk">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="NS0?wW4pIbx9)fY,Xiqa">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="U?57`D)MS,~NwrLt[I5u">
<field name="VAR" id="i!o.-Ha)p18KJmC7sy:z">stunde</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="JMJ{duW8sv=nwo^:39h3">
<field name="VAR" id="2]{L:*:~P%K~o/VBmsiG">start1h</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="update" id="~_6S%,WZ][E^nlvlRJXE">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">0_userdata.0.SB_10_manuell_laden</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="CpF%8d:6}p-SqTWpemF4">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
</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>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>