Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. [Gelöst] Ölvorrat Enddatum berechnen

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    2.4k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    973

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.3k

[Gelöst] Ölvorrat Enddatum berechnen

Geplant Angeheftet Gesperrt Verschoben Skripten / Logik
26 Beiträge 3 Kommentatoren 743 Aufrufe 2 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • draexlerD draexler

    @bloop Klar, die Daten kommen bei mir von OilFox Adapter

    <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
        <variable id="Ba?jI=0`},WZkAklj9UY">Aktuelle Gesamtliter</variable>
        <variable id=",j`lD5R@o^vY1dn=J1Ri">Vortages Gesamtliter</variable>
        <variable id="A:[,q0}0Mc5PM}:WG[/C">Liste</variable>
        <variable id=".!6VpMHf0;.oBql=(;L[">Resttage</variable>
        <variable id="8##s`Cf.5PM`hW1ICfp:">Enddatum</variable>
        <variable id="Nt0Pwp;n{))7kf_5,PzF">Füllstand 10%</variable>
        <variable id="%w`XV}7JPc!`qo%?zRwT">Füllstand 20%</variable>
      </variables>
      <block type="comment" id="yQ/`bQv2{;m{v!.QX$g[" x="112" y="-65">
        <field name="COMMENT">Berechnung Prozent Füllung</field>
        <next>
          <block type="on" id="xWWLMGcv-,2W(a*m(zdo">
            <field name="OID">alias.0.Aussenbereich.Messung.FüllstandÖl.Füllstand Öl Prozent</field>
            <field name="CONDITION">any</field>
            <field name="ACK_CONDITION"></field>
            <statement name="STATEMENT">
              <block type="update" id="e!A-h,w:`yy?#=0p%Y-9">
                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Fuellstand_%</field>
                <field name="WITH_DELAY">FALSE</field>
                <value name="VALUE">
                  <block type="on_source" id="nzPSu4CpXx;i*|,-ulI%">
                    <field name="ATTR">state.val</field>
                  </block>
                </value>
              </block>
            </statement>
            <next>
              <block type="comment" id="vq5[,vtvo3Z*5e:dG.s*">
                <field name="COMMENT">Berechnung Restliter und Tagesverbrauch L</field>
                <next>
                  <block type="on" id="[WKJ{i|4BW/DuaUKN9m,">
                    <field name="OID">alias.0.Aussenbereich.Messung.FüllstandÖl.Füllstand Öl Liter</field>
                    <field name="CONDITION">any</field>
                    <field name="ACK_CONDITION"></field>
                    <statement name="STATEMENT">
                      <block type="variables_set" id="H5mJ2`@10iB8;am7eP%N">
                        <field name="VAR" id="Ba?jI=0`},WZkAklj9UY">Aktuelle Gesamtliter</field>
                        <value name="VALUE">
                          <block type="on_source" id="!eDHfOZEyd6`.]tFh=E4">
                            <field name="ATTR">state.val</field>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id=".udi4[FNut/UKW/x-7Gz">
                            <field name="VAR" id=",j`lD5R@o^vY1dn=J1Ri">Vortages Gesamtliter</field>
                            <value name="VALUE">
                              <block type="get_value" id="@8Jv.}m;R]7:AL3$HNt)">
                                <field name="ATTR">val</field>
                                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Fuellstand_L</field>
                              </block>
                            </value>
                            <next>
                              <block type="controls_if" id="6kqI!!UZV-/~K~4a]0h=">
                                <mutation else="1"></mutation>
                                <value name="IF0">
                                  <block type="logic_compare" id="Glldr4pC5k]M}fr[fhvM">
                                    <field name="OP">GT</field>
                                    <value name="A">
                                      <block type="variables_get" id="Q;Xv*COg9o@JEPoV])39">
                                        <field name="VAR" id=",j`lD5R@o^vY1dn=J1Ri">Vortages Gesamtliter</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="variables_get" id="td~vKZ4^HL+!{Y2dw9qP">
                                        <field name="VAR" id="Ba?jI=0`},WZkAklj9UY">Aktuelle Gesamtliter</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="update" id="BN#y!TKF/2tg9fvzdF;a">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Verbrauch_Vortag</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="math_arithmetic" id="nQ*#aG5XiPWBN$$IJAu$">
                                        <field name="OP">MINUS</field>
                                        <value name="A">
                                          <shadow type="math_number" id="~x(7R{uyy/j:%XbWA6v5">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="variables_get" id="Hs%!LS}uaC.-ch8nzM8]">
                                            <field name="VAR" id=",j`lD5R@o^vY1dn=J1Ri">Vortages Gesamtliter</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <shadow type="math_number" id="j^}pYa.g7ut7esy7#{Q`">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="variables_get" id=")M#ik5^1U#0MBQ13i,pb">
                                            <field name="VAR" id="Ba?jI=0`},WZkAklj9UY">Aktuelle Gesamtliter</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                                <statement name="ELSE">
                                  <block type="update" id="2);[YVmJ,c0+@We$:#^M">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Verbrauch_Vortag</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="math_number" id="fth%+(!;%5{/I66moqY)">
                                        <field name="NUM">0</field>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                                <next>
                                  <block type="update" id="u;@x$gJeV{4(xrRPo1tZ">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Fuellstand_L</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="on_source" id="A,)l6MIn3xYgLq9O2e}b">
                                        <field name="ATTR">state.val</field>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </statement>
                    <next>
                      <block type="comment" id=":dh!2M|;Vu+S2e#=GZa]">
                        <field name="COMMENT">Berechnung Resttage</field>
                        <next>
                          <block type="controls_if" id="Zzm6V`$7,^5^3DUcrUtd">
                            <mutation else="1"></mutation>
                            <value name="IF0">
                              <block type="get_value" id="Q:PQD]q#gy`$=rRX9n}g">
                                <field name="ATTR">val</field>
                                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Durchschnittsvortagesverbräuche</field>
                              </block>
                            </value>
                            <statement name="DO0">
                              <block type="variables_set" id="sU;};iWgf.DI-wIszWyx">
                                <field name="VAR" id="A:[,q0}0Mc5PM}:WG[/C">Liste</field>
                                <value name="VALUE">
                                  <block type="get_value" id="1Yc5]1xEB)^tN)/Y)+zw">
                                    <field name="ATTR">val</field>
                                    <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Durchschnittsvortagesverbräuche</field>
                                  </block>
                                </value>
                              </block>
                            </statement>
                            <statement name="ELSE">
                              <block type="variables_set" id="VlhqFV{):hep4zb+oD#m">
                                <field name="VAR" id="A:[,q0}0Mc5PM}:WG[/C">Liste</field>
                                <value name="VALUE">
                                  <block type="lists_repeat" id="^QsD4S+mwbR8/w{2OkEp">
                                    <value name="NUM">
                                      <shadow type="math_number">
                                        <field name="NUM">0</field>
                                      </shadow>
                                      <block type="math_number" id="+E=^FGKZYoY5xb_|ZqgX">
                                        <field name="NUM">14</field>
                                      </block>
                                    </value>
                                    <value name="ITEM">
                                      <block type="get_value" id="^_9W$p.wsvyBD.`3l+uy">
                                        <field name="ATTR">val</field>
                                        <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Verbrauch_Vortag</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </statement>
                            <next>
                              <block type="on" id="pEt$Rv}M7$2iZ4,%gC8t">
                                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Verbrauch_Vortag</field>
                                <field name="CONDITION">any</field>
                                <field name="ACK_CONDITION"></field>
                                <statement name="STATEMENT">
                                  <block type="lists_setIndex" id="2%7:v.@vb2HJT/;RRp[p">
                                    <mutation at="false"></mutation>
                                    <field name="MODE">INSERT</field>
                                    <field name="WHERE">LAST</field>
                                    <value name="LIST">
                                      <block type="variables_get" id="zm1WL%uHwe-xDYY([}.r">
                                        <field name="VAR" id="A:[,q0}0Mc5PM}:WG[/C">Liste</field>
                                      </block>
                                    </value>
                                    <value name="TO">
                                      <block type="on_source" id=":{z%kt@Sa(2G{z-IQ,Z.">
                                        <field name="ATTR">state.val</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="lists_getIndex" id="/9amSlx$.^ERY+SIDpJi">
                                        <mutation statement="true" at="false"></mutation>
                                        <field name="MODE">REMOVE</field>
                                        <field name="WHERE">FIRST</field>
                                        <value name="VALUE">
                                          <block type="variables_get" id="y6@$a70Q56G.qXZ9[Ivf">
                                            <field name="VAR" id="A:[,q0}0Mc5PM}:WG[/C">Liste</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="update" id="d0yfxN^DgdzVr$^,oa8R">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Durchschnittsvortagesverbräuche</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="variables_get" id="7X4lrDI9p1E.Qy$0n0E)">
                                                <field name="VAR" id="A:[,q0}0Mc5PM}:WG[/C">Liste</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="variables_set" id="2_iY24NBV[]zjozY4biu">
                                                <field name="VAR" id=".!6VpMHf0;.oBql=(;L[">Resttage</field>
                                                <value name="VALUE">
                                                  <block type="math_arithmetic" id="se3=v~6pkr.sVb*S*UO#">
                                                    <field name="OP">DIVIDE</field>
                                                    <value name="A">
                                                      <shadow type="math_number">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="get_value" id="EzriG=-0?aFA}bsdI?z@">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Fuellstand_L</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <shadow type="math_number">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="math_on_list" id="3?CTC+cm:O|b}P[%2iu`">
                                                        <mutation op="AVERAGE"></mutation>
                                                        <field name="OP">AVERAGE</field>
                                                        <value name="LIST">
                                                          <block type="variables_get" id="aKgYPV%h|8lw{[_8!^A3">
                                                            <field name="VAR" id="A:[,q0}0Mc5PM}:WG[/C">Liste</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="variables_set" id="7]rmM5hr![me;lJGB1_O">
                                                    <field name="VAR" id="8##s`Cf.5PM`hW1ICfp:">Enddatum</field>
                                                    <value name="VALUE">
                                                      <block type="math_arithmetic" id="vU@FGQ/%#3(T*[gCYeNK">
                                                        <field name="OP">ADD</field>
                                                        <value name="A">
                                                          <shadow type="math_number">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="time_get" id="4Cx9?i|u@f]}o?dsi}kh">
                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                            <field name="OPTION">object</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <shadow type="math_number">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="math_arithmetic" id="dq4?ERdybPC2`ylvjfC_">
                                                            <field name="OP">MULTIPLY</field>
                                                            <value name="A">
                                                              <shadow type="math_number">
                                                                <field name="NUM">1</field>
                                                              </shadow>
                                                              <block type="math_number" id="hFc~O8M9l%.+26[m#Fo#">
                                                                <field name="NUM">86400000</field>
                                                              </block>
                                                            </value>
                                                            <value name="B">
                                                              <shadow type="math_number">
                                                                <field name="NUM">1</field>
                                                              </shadow>
                                                              <block type="variables_get" id="Q4}@Hdx-BS{4TYrpF:7^">
                                                                <field name="VAR" id=".!6VpMHf0;.oBql=(;L[">Resttage</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="update" id="yhp#|=Xbv.A8Fg1.3#V9">
                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                        <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Datum_Öltank_leer</field>
                                                        <field name="WITH_DELAY">FALSE</field>
                                                        <value name="VALUE">
                                                          <block type="text_join" id="z5Lx,H|Eu.xVayfI*Ad3">
                                                            <mutation items="3"></mutation>
                                                            <value name="ADD0">
                                                              <block type="convert_from_date" id="zsi*}rV}-1Y0/_$gKu5?">
                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="true"></mutation>
                                                                <field name="OPTION">Mts</field>
                                                                <field name="LANGUAGE">de</field>
                                                                <value name="VALUE">
                                                                  <block type="variables_get" id="j2][{`Gd!lne)TZd5aGE">
                                                                    <field name="VAR" id="8##s`Cf.5PM`hW1ICfp:">Enddatum</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <value name="ADD1">
                                                              <block type="text" id="Mt--~`1/v.9XSf(?03x@">
                                                                <field name="TEXT"> </field>
                                                              </block>
                                                            </value>
                                                            <value name="ADD2">
                                                              <block type="convert_from_date" id="-j)}0|CNovODO{L@|9JV">
                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                                                                <field name="OPTION">custom</field>
                                                                <field name="FORMAT">JJJJ</field>
                                                                <value name="VALUE">
                                                                  <block type="variables_get" id="SU+@=$Dt~@MZ#xWUv1f_">
                                                                    <field name="VAR" id="8##s`Cf.5PM`hW1ICfp:">Enddatum</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                                <next>
                                  <block type="comment" id="rgKsmt?%~[)O{%]$~%gG">
                                    <field name="COMMENT">Steuerung Imageanzeige</field>
                                    <next>
                                      <block type="on" id="sZl7xLPO7tND+7.HP2Cp">
                                        <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Fuellstand_%</field>
                                        <field name="CONDITION">ne</field>
                                        <field name="ACK_CONDITION"></field>
                                        <statement name="STATEMENT">
                                          <block type="controls_if" id="+`{fZG5TuA88kT-O.ib`">
                                            <mutation elseif="10"></mutation>
                                            <value name="IF0">
                                              <block type="logic_compare" id="oRh,n0,h[Z3XDJZOZ;%Y">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="on_source" id="dZ^L%cJ`zI=)!Eny!::q">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="DY9q3:ZIIix4rR{t2+^T">
                                                    <field name="NUM">9</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="update" id="1?e:2b4iVK1[JxXKXv#T">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Imagesteuerung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="lM!.+XX,yAj%6(hNU.rW">
                                                    <field name="NUM">0</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                            <value name="IF1">
                                              <block type="logic_compare" id="taG`}wV]3d7QJ:+$4kY+">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="on_source" id="X/qT.nm=|7a^=+3x-^(4">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="yo#_*MjWu^3kq@ES7i%1">
                                                    <field name="NUM">19</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO1">
                                              <block type="controls_if" id="osA3M+F]dVNEcNKvu2:0">
                                                <value name="IF0">
                                                  <block type="logic_compare" id="@{2CWj}B6:qh}30KW!JD">
                                                    <field name="OP">EQ</field>
                                                    <value name="A">
                                                      <block type="variables_get" id="i:,n;qsD)GQ4(oS272L?">
                                                        <field name="VAR" id="Nt0Pwp;n{))7kf_5,PzF">Füllstand 10%</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_boolean" id="K;vl;8G~XG3:5FpcTesx">
                                                        <field name="BOOL">TRUE</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <statement name="DO0">
                                                  <block type="pushover" id="0`sr/gx~._Iy]c~xRl%%">
                                                    <field name="INSTANCE">.0</field>
                                                    <field name="SOUND"></field>
                                                    <field name="PRIORITY">0</field>
                                                    <field name="LOG"></field>
                                                    <value name="MESSAGE">
                                                      <shadow type="text" id="f@(%s(qDdp|o8A8aGzUo">
                                                        <field name="TEXT"></field>
                                                      </shadow>
                                                      <block type="text" id="fe.;}2UO1M,8X`~b+9o3">
                                                        <field name="TEXT">Öltank nur noch zu 10% gefüllt! 🛢</field>
                                                      </block>
                                                    </value>
                                                    <value name="TITLE">
                                                      <block type="text" id="]V79E8aM3:#Z_9=DhT5@">
                                                        <field name="TEXT">Öltankmeldung</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="variables_set" id="jLyL%],g0Nh4+1zM}7u3">
                                                        <field name="VAR" id="Nt0Pwp;n{))7kf_5,PzF">Füllstand 10%</field>
                                                        <value name="VALUE">
                                                          <block type="logic_boolean" id="#c+rK}{dL[7cwh*:8ROy">
                                                            <field name="BOOL">FALSE</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </statement>
                                                <next>
                                                  <block type="update" id="}I]jR##jZt-K^~[d|_JZ">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Imagesteuerung</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_number" id="s3h%5P/]TELP[g7IYN,/">
                                                        <field name="NUM">1</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                            <value name="IF2">
                                              <block type="logic_compare" id="yQ?T/tJx9e}Cx7J{kT!S">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="on_source" id="H2;l/M]ZZOrqsL8]L|E.">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="gYM5^O`[~Pwd)$8z+qyC">
                                                    <field name="NUM">29</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO2">
                                              <block type="controls_if" id="Suz:!pU8^?j`TsTO(9[:">
                                                <value name="IF0">
                                                  <block type="logic_compare" id="[cM(Cv?{HJdwyw]YA|_Z">
                                                    <field name="OP">EQ</field>
                                                    <value name="A">
                                                      <block type="variables_get" id="D*Aye2=s~(RCr^jk=TSc">
                                                        <field name="VAR" id="%w`XV}7JPc!`qo%?zRwT">Füllstand 20%</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_boolean" id="m2QNaGsl9@9I`z#TFKWr">
                                                        <field name="BOOL">TRUE</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <statement name="DO0">
                                                  <block type="pushover" id="t.g6/RG5byTUxKM?PXvk">
                                                    <field name="INSTANCE">.0</field>
                                                    <field name="SOUND"></field>
                                                    <field name="PRIORITY">0</field>
                                                    <field name="LOG"></field>
                                                    <value name="MESSAGE">
                                                      <shadow type="text" id="It|*CB:=X$jsl3y#%|xk">
                                                        <field name="TEXT"></field>
                                                      </shadow>
                                                      <block type="text" id="wMw|H}*7_GL{mMJ=)19N">
                                                        <field name="TEXT">Öltank noch zu 20% gefüllt! 🛢</field>
                                                      </block>
                                                    </value>
                                                    <value name="TITLE">
                                                      <block type="text" id="9,#G1)C~i~owb=tkMmtr">
                                                        <field name="TEXT">Öltankmeldung</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="variables_set" id="J=:cxE?{Me].[lw-e*g4">
                                                        <field name="VAR" id="%w`XV}7JPc!`qo%?zRwT">Füllstand 20%</field>
                                                        <value name="VALUE">
                                                          <block type="logic_boolean" id="!)cXPs`Cny,jT+@`/6{K">
                                                            <field name="BOOL">FALSE</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </statement>
                                                <next>
                                                  <block type="update" id="{]Yf9jV]5iWUYh6(J#r-">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Imagesteuerung</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_number" id="upQBFM3@2KN4Z8#TS)rw">
                                                        <field name="NUM">2</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                            <value name="IF3">
                                              <block type="logic_compare" id="WvY/^v(+/1nR.hS#q8:{">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="on_source" id="/W8V64e[c_}bK9UwL}lH">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="4(QJ)bLGjW)-K1_l|XB8">
                                                    <field name="NUM">39</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO3">
                                              <block type="update" id="K]GT-V@npBDY9#?rEBu*">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Imagesteuerung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="QOQ=GlLxsaqEAm_dTkQv">
                                                    <field name="NUM">3</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                            <value name="IF4">
                                              <block type="logic_compare" id="Jz#7cHT[eEU4?5`]WlEI">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="on_source" id="rXU$3B5Iv}8=MyPu{8B+">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id=")y3#qJ@v^F-*PW|6/-Y)">
                                                    <field name="NUM">49</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO4">
                                              <block type="update" id="%__o@IcSEGzZ6HxxvQ4m">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Imagesteuerung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="b(zc8r!l_I;!ue}3$$7J">
                                                    <field name="NUM">4</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                            <value name="IF5">
                                              <block type="logic_compare" id="sW705?BN_7!g9xiDmB#o">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="on_source" id="Y4[I.?{.^?%|#k(23o.b">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="#}c:fJHm#6dVM)H_.Tb2">
                                                    <field name="NUM">59</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO5">
                                              <block type="update" id="P8*nLb3amffnW%3K_oR,">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Imagesteuerung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="lOmFN~[mSaEf)|$=qm;J">
                                                    <field name="NUM">5</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                            <value name="IF6">
                                              <block type="logic_compare" id="Vm8J3f155M9gnf6x.agK">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="on_source" id="vl@|:(Dd[;6Ye=``a~_@">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="~niFqjIo:/*dWpo*)#z0">
                                                    <field name="NUM">69</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO6">
                                              <block type="update" id="yUQc.3Jvj`{_@GXz0Q~i">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Imagesteuerung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="56X_hWnV-7GA*#x[k@I)">
                                                    <field name="NUM">6</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                            <value name="IF7">
                                              <block type="logic_compare" id="~/=[h9*ag+Iw[PhWKl*H">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="on_source" id="P9pVwV*GyAdoEcZ,4M7+">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="gk2d},P=_d%zs_=%`wl~">
                                                    <field name="NUM">79</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO7">
                                              <block type="update" id="$qHRNX-mj}ymoUj?$V73">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Imagesteuerung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="]LP!nL)D~BAt#!srnB0.">
                                                    <field name="NUM">7</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                            <value name="IF8">
                                              <block type="logic_compare" id="[cjt4gH4_c1hq!;F!~V^">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="on_source" id="dK;I{IsTQ0Ac.+cjzMs=">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="IEU[zH+JYcy$z65jZS|)">
                                                    <field name="NUM">89</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO8">
                                              <block type="update" id="B^/U8+@?,rG~=u~].{Ii">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Imagesteuerung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="RE2taDf7KSXD/1B#u:y}">
                                                    <field name="NUM">8</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                            <value name="IF9">
                                              <block type="logic_compare" id="T/6to`;_|(teq4X{OsJS">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="on_source" id="?qR[3=]oSb7V^ovP=NNg">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="wKBkw}([Vhiuy3_@[4d1">
                                                    <field name="NUM">99</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO9">
                                              <block type="update" id="+MOggYtcQ94L1gzbXZYo">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Imagesteuerung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="^4#xQz0f3`{%gc8CO$K;">
                                                    <field name="NUM">9</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="variables_set" id="yFZlRjz`yv)*@:,/nTC4">
                                                    <field name="VAR" id="Nt0Pwp;n{))7kf_5,PzF">Füllstand 10%</field>
                                                    <value name="VALUE">
                                                      <block type="logic_boolean" id="U^`{#OC4ZixC?kRQan}P">
                                                        <field name="BOOL">TRUE</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="variables_set" id="jp}o}xn69xaVflqtaj2R">
                                                        <field name="VAR" id="%w`XV}7JPc!`qo%?zRwT">Füllstand 20%</field>
                                                        <value name="VALUE">
                                                          <block type="logic_boolean" id="K1xm/dy,%J$FP^C_eu=0">
                                                            <field name="BOOL">TRUE</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                            <value name="IF10">
                                              <block type="logic_compare" id="pGR[%49)-l6|7M*@L3Pf">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="on_source" id=";D(|r4G+4_nPfa9=k-~`">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id=".gE~]sZc?,~]9amBX_-D">
                                                    <field name="NUM">100</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO10">
                                              <block type="update" id="QXVF{!,Gf0hb7LmkciR]">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.VIS_Datenpunkte.Öltank.Imagesteuerung</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="@`gRPS%J?K?RcphxwX3S">
                                                    <field name="NUM">10</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </statement>
                                          </block>
                                        </statement>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </xml>
    

    Die Datenpunkte brauchst du noch:
    Bildschirmfoto 2022-10-04 um 22.50.40.png

    B Offline
    B Offline
    bloop
    schrieb am zuletzt editiert von
    #15

    @draexler
    Herzlichen Dank!
    Mach mich gleich an die Arbeit ;)

    1 Antwort Letzte Antwort
    0
    • B Offline
      B Offline
      bloop
      schrieb am zuletzt editiert von
      #16

      Hallo,
      Ich habe mir die Datenpunkte entsprechend meinen Vorgaben angepasst.
      Leider bekomme jedoch bei der Liste einen Fehler welchen ich nicht zuordnen kann.

      javascript.0
      2022-10-08 00:00:00.346	error	at processImmediate (node:internal/timers:466:21)
      
      javascript.0
      2022-10-08 00:00:00.346	error	at Immediate.<anonymous> (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/src/lib/adapter/adapter.js:5909:56)
      
      javascript.0
      2022-10-08 00:00:00.345	error	at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:596:29)
      
      javascript.0
      2022-10-08 00:00:00.345	error	at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1214:38)
      
      javascript.0
      2022-10-08 00:00:00.344	error	at Object.<anonymous> (script.js.common.Heizung.Öl-Verbrauch:31:9)
      
      javascript.0
      2022-10-08 00:00:00.340	error	script.js.common.Heizung.Öl-Verbrauch: TypeError: Liste.push is not a function
      

      TypeError: Liste.push is not a function sagt mir überhaupt nichts...

      4e6e747a-0fe2-4f68-ac53-b4aebb280331-image.png

      Den vorherigen Tagesverbrauch erhalte ich um 0.00 von Sourceanalytics.

        "type": "state",
        "common": {
          "name": "01_previousDay",
          "type": "number",
          "role": "value",
          "read": true,
          "write": false,
          "unit": "l",
          "def": 0
      

      Sollte doch eigentlich so funktionieren, oder wo hat sich hier etwas eingeschlichen?

      draexlerD 1 Antwort Letzte Antwort
      0
      • B bloop

        Hallo,
        Ich habe mir die Datenpunkte entsprechend meinen Vorgaben angepasst.
        Leider bekomme jedoch bei der Liste einen Fehler welchen ich nicht zuordnen kann.

        javascript.0
        2022-10-08 00:00:00.346	error	at processImmediate (node:internal/timers:466:21)
        
        javascript.0
        2022-10-08 00:00:00.346	error	at Immediate.<anonymous> (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/src/lib/adapter/adapter.js:5909:56)
        
        javascript.0
        2022-10-08 00:00:00.345	error	at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:596:29)
        
        javascript.0
        2022-10-08 00:00:00.345	error	at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1214:38)
        
        javascript.0
        2022-10-08 00:00:00.344	error	at Object.<anonymous> (script.js.common.Heizung.Öl-Verbrauch:31:9)
        
        javascript.0
        2022-10-08 00:00:00.340	error	script.js.common.Heizung.Öl-Verbrauch: TypeError: Liste.push is not a function
        

        TypeError: Liste.push is not a function sagt mir überhaupt nichts...

        4e6e747a-0fe2-4f68-ac53-b4aebb280331-image.png

        Den vorherigen Tagesverbrauch erhalte ich um 0.00 von Sourceanalytics.

          "type": "state",
          "common": {
            "name": "01_previousDay",
            "type": "number",
            "role": "value",
            "read": true,
            "write": false,
            "unit": "l",
            "def": 0
        

        Sollte doch eigentlich so funktionieren, oder wo hat sich hier etwas eingeschlichen?

        draexlerD Online
        draexlerD Online
        draexler
        schrieb am zuletzt editiert von
        #17

        @bloop zeig mal die Einstellungen vom Datenpunkt der Liste

        B 1 Antwort Letzte Antwort
        0
        • draexlerD draexler

          @bloop zeig mal die Einstellungen vom Datenpunkt der Liste

          B Offline
          B Offline
          bloop
          schrieb am zuletzt editiert von
          #18

          @draexler

          {
           "common": {
             "name": "Durchschnittsvortagsverbräuche",
             "desc": "Manuell erzeugt",
             "role": "state",
             "type": "string",
             "read": true,
             "write": true,
             "def": 0
           },
          

          Sollte eigentlich auch passen

          B 1 Antwort Letzte Antwort
          0
          • B bloop

            @draexler

            {
             "common": {
               "name": "Durchschnittsvortagsverbräuche",
               "desc": "Manuell erzeugt",
               "role": "state",
               "type": "string",
               "read": true,
               "write": true,
               "def": 0
             },
            

            Sollte eigentlich auch passen

            B Offline
            B Offline
            bloop
            schrieb am zuletzt editiert von
            #19

            @bloop
            Mit "rolle" und "type" wie bei dir funktionierts. Allerdings erhalte ich immer noch die Warnung das der Datenpunkt eine Nummer möchte und String erhält.

            draexlerD paul53P 2 Antworten Letzte Antwort
            0
            • B bloop

              @bloop
              Mit "rolle" und "type" wie bei dir funktionierts. Allerdings erhalte ich immer noch die Warnung das der Datenpunkt eine Nummer möchte und String erhält.

              draexlerD Online
              draexlerD Online
              draexler
              schrieb am zuletzt editiert von draexler
              #20

              @bloop Ändere es mal so:

              
              {
                "common": {
                  "name": "Durchschnittsvortagesverbräuche",
                  "desc": "Manuell erzeugt",
                  "role": "list",
                  "type": "array",
                  "read": true,
                  "write": true
                },
              
              

              Und dann in diesen Datenpunkt eine „0“ eintragen und dann das Skript starten.

              1 Antwort Letzte Antwort
              0
              • B bloop

                @bloop
                Mit "rolle" und "type" wie bei dir funktionierts. Allerdings erhalte ich immer noch die Warnung das der Datenpunkt eine Nummer möchte und String erhält.

                paul53P Offline
                paul53P Offline
                paul53
                schrieb am zuletzt editiert von
                #21

                @bloop sagte: Warnung das der Datenpunkt eine Nummer möchte und String erhält.

                Du meinst umgekehrt? Du schreibst eine Zahl in "Datum_Ölstand_leer". Richtig:

                Bild_2022-10-08_135332723.png

                Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                B 1 Antwort Letzte Antwort
                0
                • paul53P paul53

                  @bloop sagte: Warnung das der Datenpunkt eine Nummer möchte und String erhält.

                  Du meinst umgekehrt? Du schreibst eine Zahl in "Datum_Ölstand_leer". Richtig:

                  Bild_2022-10-08_135332723.png

                  B Offline
                  B Offline
                  bloop
                  schrieb am zuletzt editiert von
                  #22

                  @paul53 nein war schon richtig

                  Aktuell funktioniert das gesamte Skript wieder nicht. Ich teste gerade an was es liegen könnte.
                  Es scheint so als würde die Listenfunktion nicht ordnungsgemäß funktioniert...

                  14:50:07.932	error	javascript.0 (59155) script.js.common.Heizung.Öl-Verbrauch1: TypeError: Liste.shift is not a function
                  14:50:07.932	error	javascript.0 (59155) at Object.<anonymous> (script.js.common.Heizung.Öl-Verbrauch1:32:9)
                  
                  on({id: "0_userdata.0.test"/*test*/, change: "any"}, async function (obj) {
                    var value = obj.state.val;
                    var oldValue = obj.oldState.val;
                   Liste[Liste.length - 1] = getState("0_userdata.0.test").val;
                    Liste.shift();
                    setState("0_userdata.0.Heizung.Öl_Heizung.Durchschnittsvortagsverbräuche"/*Durchschnittsvortagsverbräuche*/, Liste, true);
                    Resttage = parseFloat(getState("0_userdata.0.Heizung.Füllstand_Öltank").val) / mathMean(Liste);
                    Enddatum = parseFloat((new Date().getTime())) + parseFloat(86400000) * Resttage;
                    setState("0_userdata.0.Heizung.Öl_Heizung.Datum_Ölstand_leer"/*Datum_Ölstand_leer*/, formatDate(getDateObject(Enddatum), "DD.MM.YYYY"), true);
                  });
                  

                  cd269160-c4f7-4cde-8869-e2f489dd11aa-image.png

                  paul53P 1 Antwort Letzte Antwort
                  0
                  • B bloop

                    @paul53 nein war schon richtig

                    Aktuell funktioniert das gesamte Skript wieder nicht. Ich teste gerade an was es liegen könnte.
                    Es scheint so als würde die Listenfunktion nicht ordnungsgemäß funktioniert...

                    14:50:07.932	error	javascript.0 (59155) script.js.common.Heizung.Öl-Verbrauch1: TypeError: Liste.shift is not a function
                    14:50:07.932	error	javascript.0 (59155) at Object.<anonymous> (script.js.common.Heizung.Öl-Verbrauch1:32:9)
                    
                    on({id: "0_userdata.0.test"/*test*/, change: "any"}, async function (obj) {
                      var value = obj.state.val;
                      var oldValue = obj.oldState.val;
                     Liste[Liste.length - 1] = getState("0_userdata.0.test").val;
                      Liste.shift();
                      setState("0_userdata.0.Heizung.Öl_Heizung.Durchschnittsvortagsverbräuche"/*Durchschnittsvortagsverbräuche*/, Liste, true);
                      Resttage = parseFloat(getState("0_userdata.0.Heizung.Füllstand_Öltank").val) / mathMean(Liste);
                      Enddatum = parseFloat((new Date().getTime())) + parseFloat(86400000) * Resttage;
                      setState("0_userdata.0.Heizung.Öl_Heizung.Datum_Ölstand_leer"/*Datum_Ölstand_leer*/, formatDate(getDateObject(Enddatum), "DD.MM.YYYY"), true);
                    });
                    

                    cd269160-c4f7-4cde-8869-e2f489dd11aa-image.png

                    paul53P Offline
                    paul53P Offline
                    paul53
                    schrieb am zuletzt editiert von
                    #23

                    @bloop
                    "setze für Letzte ein" ist falsch. Dann wird die Liste immer kürzer. Man muss an die Liste anfügen "füge als Letzte ein".

                    Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                    Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                    B 1 Antwort Letzte Antwort
                    0
                    • paul53P paul53

                      @bloop
                      "setze für Letzte ein" ist falsch. Dann wird die Liste immer kürzer. Man muss an die Liste anfügen "füge als Letzte ein".

                      B Offline
                      B Offline
                      bloop
                      schrieb am zuletzt editiert von
                      #24

                      @paul53
                      Klappt leider auch nicht

                      javascript.0 (59155) script.js.common.Heizung.Öl-Verbrauch: TypeError: Liste.push is not a function
                      
                      // Berechnung Resttage
                      if (getState("0_userdata.0.Heizung.Öl_Heizung.Durchschnittsvortagsverbräuche").val) {
                        Liste = getState("0_userdata.0.Heizung.Öl_Heizung.Durchschnittsvortagsverbräuche").val;
                      } else {
                        Liste = listsRepeat(getState("0_userdata.0.test").val, 14);
                      }
                      on({id: "0_userdata.0.test"/*test*/, change: "any"}, async function (obj) {
                        var value = obj.state.val;
                        var oldValue = obj.oldState.val;
                        Liste.push(getState("0_userdata.0.test").val);
                        Liste.shift();
                        setState("0_userdata.0.Heizung.Öl_Heizung.Durchschnittsvortagsverbräuche"/*Durchschnittsvortagsverbräuche*/, Liste, true);
                        Resttage = parseFloat(getState("0_userdata.0.Heizung.Füllstand_Öltank").val) / mathMean(Liste);
                        Enddatum = parseFloat((new Date().getTime())) + parseFloat(86400000) * Resttage;
                        setState("0_userdata.0.Heizung.Öl_Heizung.Datum_Ölstand_leer"/*Datum_Ölstand_leer*/, formatDate(getDateObject(Enddatum), "DD.MM.YYYY"), true);
                      });
                      
                      
                      paul53P 1 Antwort Letzte Antwort
                      0
                      • B bloop

                        @paul53
                        Klappt leider auch nicht

                        javascript.0 (59155) script.js.common.Heizung.Öl-Verbrauch: TypeError: Liste.push is not a function
                        
                        // Berechnung Resttage
                        if (getState("0_userdata.0.Heizung.Öl_Heizung.Durchschnittsvortagsverbräuche").val) {
                          Liste = getState("0_userdata.0.Heizung.Öl_Heizung.Durchschnittsvortagsverbräuche").val;
                        } else {
                          Liste = listsRepeat(getState("0_userdata.0.test").val, 14);
                        }
                        on({id: "0_userdata.0.test"/*test*/, change: "any"}, async function (obj) {
                          var value = obj.state.val;
                          var oldValue = obj.oldState.val;
                          Liste.push(getState("0_userdata.0.test").val);
                          Liste.shift();
                          setState("0_userdata.0.Heizung.Öl_Heizung.Durchschnittsvortagsverbräuche"/*Durchschnittsvortagsverbräuche*/, Liste, true);
                          Resttage = parseFloat(getState("0_userdata.0.Heizung.Füllstand_Öltank").val) / mathMean(Liste);
                          Enddatum = parseFloat((new Date().getTime())) + parseFloat(86400000) * Resttage;
                          setState("0_userdata.0.Heizung.Öl_Heizung.Datum_Ölstand_leer"/*Datum_Ölstand_leer*/, formatDate(getDateObject(Enddatum), "DD.MM.YYYY"), true);
                        });
                        
                        
                        paul53P Offline
                        paul53P Offline
                        paul53
                        schrieb am zuletzt editiert von
                        #25

                        @bloop sagte in [Gelöst] Ölvorrat Enddatum berechnen:

                        Klappt leider auch nicht

                        Wenn sich die Liste im Datenpunkt schon verkürzt hat, muss neu initialisiert werden: Stoppe das Skript, trage 0 in den Datenpunkt "0_userdata.0.Heizung.Öl_Heizung.Durchschnittsvortagsverbräuche" ein und starte das Skript.

                        Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                        Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                        B 1 Antwort Letzte Antwort
                        0
                        • paul53P paul53

                          @bloop sagte in [Gelöst] Ölvorrat Enddatum berechnen:

                          Klappt leider auch nicht

                          Wenn sich die Liste im Datenpunkt schon verkürzt hat, muss neu initialisiert werden: Stoppe das Skript, trage 0 in den Datenpunkt "0_userdata.0.Heizung.Öl_Heizung.Durchschnittsvortagsverbräuche" ein und starte das Skript.

                          B Offline
                          B Offline
                          bloop
                          schrieb am zuletzt editiert von
                          #26

                          @paul53
                          Hat geklappt indem ich einen neuen Datenpunkt für die Durchschnittsverbräuche angelegt habe!

                          Herzlichen Dank!

                          1 Antwort Letzte Antwort
                          0
                          Antworten
                          • In einem neuen Thema antworten
                          Anmelden zum Antworten
                          • Älteste zuerst
                          • Neuste zuerst
                          • Meiste Stimmen


                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          391

                          Online

                          32.6k

                          Benutzer

                          82.2k

                          Themen

                          1.3m

                          Beiträge
                          Community
                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                          ioBroker Community 2014-2025
                          logo
                          • Anmelden

                          • Du hast noch kein Konto? Registrieren

                          • Anmelden oder registrieren, um zu suchen
                          • Erster Beitrag
                            Letzter Beitrag
                          0
                          • Home
                          • Aktuell
                          • Tags
                          • Ungelesen 0
                          • Kategorien
                          • Unreplied
                          • Beliebt
                          • GitHub
                          • Docu
                          • Hilfe