@sralus sagte: SOC + Active Power und PV Wert zum schalten
So?
Blockly_temp.JPG
Spoiler
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="%x.ht`Gvdji_eJHlZi3|">aktor</variable>
<variable id="OioQhFWyl4r@},SXcFZ|">wirkleistung</variable>
<variable id="smc+b.VLa_UiINUKtNHM">freigabe</variable>
<variable id="BCjX^ZBy,k/RR)n5LI7)">pv</variable>
</variables>
<block type="variables_set" id="%^.DGaVnsq/!Wc_{p-IN" x="-3138" y="-2213">
<field name="VAR" id="%x.ht`Gvdji_eJHlZi3|">aktor</field>
<value name="VALUE">
<block type="get_value" id="|SZI9.`oF_(I5x,KhwW7">
<field name="ATTR">val</field>
<field name="OID">sonoff.1.Tasmota1.POWER</field>
</block>
</value>
<next>
<block type="variables_set" id="ZJXi-{G:P?7c$;{u@w,g">
<field name="VAR" id="OioQhFWyl4r@},SXcFZ|">wirkleistung</field>
<value name="VALUE">
<block type="get_value" id="T_D`PrR54kS_eo004Ti!">
<field name="ATTR">val</field>
<field name="OID">mqtt.0.solaranzeige.3.ac_wirkleistung</field>
</block>
</value>
<next>
<block type="variables_set" id="7r]m4Hw~+Bq[Fg?S%s7e">
<field name="VAR" id="smc+b.VLa_UiINUKtNHM">freigabe</field>
<value name="VALUE">
<block type="logic_ternary" id=".:h6oJmB8oxWM6,6PCzp">
<value name="IF">
<block type="variables_get" id="0Qtb+#Q`k?^F`~xeqx6+">
<field name="VAR" id="%x.ht`Gvdji_eJHlZi3|">aktor</field>
</block>
</value>
<value name="THEN">
<block type="logic_compare" id="%Az?,;R%{`JZ]k[v$2$j">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id="s|s$e4N{RAp@ftKe2CM@">
<field name="VAR" id="OioQhFWyl4r@},SXcFZ|">wirkleistung</field>
</block>
</value>
<value name="B">
<block type="math_number" id="HX,5!9;y1lj3+l7;`6fW">
<field name="NUM">200</field>
</block>
</value>
</block>
</value>
<value name="ELSE">
<block type="logic_compare" id="|a?sX!LjLou.Gqa/1!3L">
<field name="OP">LT</field>
<value name="A">
<block type="variables_get" id="OiI){}vEXdn?VLTZ@ZwK">
<field name="VAR" id="OioQhFWyl4r@},SXcFZ|">wirkleistung</field>
</block>
</value>
<value name="B">
<block type="math_number" id="kBs|4MDb9=^:{dq5k)Xp">
<field name="NUM">2800</field>
</block>
</value>
</block>
</value>
</block>
</value>
<next>
<block type="variables_set" id="!5-^0MP7,NvVRz-giZu#">
<field name="VAR" id="BCjX^ZBy,k/RR)n5LI7)">pv</field>
<value name="VALUE">
<block type="logic_compare" id="9zhx$:4DxN`,_uf}zkZX">
<field name="OP">GT</field>
<value name="A">
<block type="get_value" id="1BfH@lWgE%Ho[a7=X%e~">
<field name="ATTR">val</field>
<field name="OID">mqtt.0.solaranzeige.3.solarleistung1</field>
</block>
</value>
<value name="B">
<block type="math_number" id="v|Wx2%Cv*y}Uw5M]QS=V">
<field name="NUM">2200</field>
</block>
</value>
</block>
</value>
<next>
<block type="on" id="-Mk_mb-es!cq=MVXg,[H">
<field name="OID">mqtt.0.Data.Percent_Remain</field>
<field name="CONDITION">any</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="controls_if" id="Cs]e0[au,$508-RRa~,u">
<value name="IF0">
<block type="logic_operation" id="a:RGHQGr6GD;[_b/598_">
<field name="OP">AND</field>
<value name="A">
<block type="variables_get" id="b1_~z[@?(~Zk%Gsad++4">
<field name="VAR" id="smc+b.VLa_UiINUKtNHM">freigabe</field>
</block>
</value>
<value name="B">
<block type="variables_get" id="(T=(xF;@]K2AR4TgIbQ$">
<field name="VAR" id="BCjX^ZBy,k/RR)n5LI7)">pv</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="controls_if" id=",c}Sa~}yD^}^K9ygY|3Z">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="pq/=X+I7HF?`QE1g]PUx">
<field name="OP">LT</field>
<value name="A">
<block type="on_source" id="vZZ-M)TZ%_rX+W~tgc6l">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<block type="math_number" id="%/(^ommiIj/46G$/w|yq">
<field name="NUM">70</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="Oe=(~AC2#|j8]~fD4+#?">
<field name="VAR" id="%x.ht`Gvdji_eJHlZi3|">aktor</field>
<value name="VALUE">
<block type="logic_boolean" id="VCS}vnf*1Pew^DYtsr?-">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="`;A$W3_1L!*L]4miStiQ">
<field name="OP">GT</field>
<value name="A">
<block type="on_source" id="_e7s61Nq0ItOEu[r*Doy">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<block type="math_number" id="/bwD2|zMt}m4@)$kc,aJ">
<field name="NUM">71</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="variables_set" id="M^O@Sd,duEsjIQV?erLn">
<field name="VAR" id="%x.ht`Gvdji_eJHlZi3|">aktor</field>
<value name="VALUE">
<block type="logic_boolean" id="5HouemIBi48UDE/}1R|^">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="sDP,tw2TK~03tky2kB#4">
<value name="IF0">
<block type="logic_compare" id="f(hqrsjY@~xq7V7.RbU@">
<field name="OP">NEQ</field>
<value name="A">
<block type="variables_get" id="g7A;E6(G:`jm|nkKM+S9">
<field name="VAR" id="%x.ht`Gvdji_eJHlZi3|">aktor</field>
</block>
</value>
<value name="B">
<block type="get_value" id="yFJke=;9vd.F{BtaFxr1">
<field name="ATTR">val</field>
<field name="OID">sonoff.1.Tasmota1.POWER</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="uh38dUI8,48L(Z(liUgP">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">sonoff.1.Tasmota1.POWER</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="variables_get" id="tgboN);[ScLgQmoDh8x3">
<field name="VAR" id="%x.ht`Gvdji_eJHlZi3|">aktor</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
<block type="on" id="rW~:Wg,FWsPaR:0e6[Fi" x="-2437" y="-2213">
<field name="OID">mqtt.0.solaranzeige.3.solarleistung1</field>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="controls_if" id="8cAg-=2uG852Uat8-%`*">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="I|[[[B}36uRH~+.bW$mD">
<field name="OP">GT</field>
<value name="A">
<block type="on_source" id="Y$0,@Hs`^Nn#]CXk#*Od">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<block type="math_number" id="}hoZw[Px=7?lZ5z@qfXY">
<field name="NUM">2200</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="p^]WN26{|7|IGgQ{w}q(">
<field name="VAR" id="BCjX^ZBy,k/RR)n5LI7)">pv</field>
<value name="VALUE">
<block type="logic_boolean" id="M@]b(o=?Mfh%qEm:[2K+">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="B;iGbh]MwY~wQpBd4!Eu">
<field name="OP">LT</field>
<value name="A">
<block type="on_source" id="VT-Qt1{%9ok5z~;ql9q$">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<block type="math_number" id="%n+-%`I482KfxUs]iy:l">
<field name="NUM">2000</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="variables_set" id="g5_2fkq(oS1b0q_0n2dm">
<field name="VAR" id="BCjX^ZBy,k/RR)n5LI7)">pv</field>
<value name="VALUE">
<block type="logic_boolean" id="3_A~ei_ETHi@HI9=jftZ">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="controls_if" id="!9n*?Y)UzV0VPvzaS1|%">
<value name="IF0">
<block type="get_value" id=";qY]9g:W[}f#zUQ=)-5H">
<field name="ATTR">val</field>
<field name="OID">sonoff.0.Tasmota.POWER</field>
</block>
</value>
<statement name="DO0">
<block type="control" id="Am#)phhkHqzYVMi_:A%l">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">sonoff.0.Tasmota.POWER</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="tsK!xS1.5seK[Il$gR^h">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</statement>
<next>
<block type="on" id="eUOAOIs)K^VM`~/ymSrX">
<field name="OID">mqtt.0.solaranzeige.3.ac_wirkleistung</field>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="controls_if" id="Q+=g^R[cQ/3%%3#@5,~+">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="7#J5-~%M))b%h1DBmq!:">
<field name="OP">LT</field>
<value name="A">
<block type="on_source" id=";3$U0Q|+xogRq%bUeOji">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<block type="math_number" id="r=.=mkJA$EO`X98dHXJ@">
<field name="NUM">200</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="9(W,}ZcQQHI8db-ud)Bq">
<field name="VAR" id="smc+b.VLa_UiINUKtNHM">freigabe</field>
<value name="VALUE">
<block type="logic_boolean" id="93=LR3JY3Co4VrHb3w]x">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="%GMBjdO?Xd4huO2.nxd8">
<field name="OP">GT</field>
<value name="A">
<block type="on_source" id="G$r-UTGpx-`8{Sj_t%)+">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<block type="math_number" id="+(/;BS[,+eSo.Nu6Imp+">
<field name="NUM">2800</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="variables_set" id="I!I*+k}X4D`:0yGjFTAZ">
<field name="VAR" id="smc+b.VLa_UiINUKtNHM">freigabe</field>
<value name="VALUE">
<block type="logic_boolean" id="uW|YyX,N~5*l}g%,~yP*">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="controls_if" id="vbJP$)c$tbqh:lI}5PRp">
<value name="IF0">
<block type="get_value" id="jQF!pto@Za6.QdjL;Q*b">
<field name="ATTR">val</field>
<field name="OID">sonoff.1.Tasmota1.POWER</field>
</block>
</value>
<statement name="DO0">
<block type="control" id="ieQx6-gk6B@Dh3F{cz5/">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">sonoff.1.Tasmota1.POWER</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="B=k%?u7KD!ei,CR?U%a0">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</xml>
Die Hysterese für den SoC erscheint mir zu gering.