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. Anzahl Tage berechnen

NEWS

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

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

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.6k

Anzahl Tage berechnen

Geplant Angeheftet Gesperrt Verschoben Skripten / Logik
blockly
23 Beiträge 4 Kommentatoren 2.2k Aufrufe 1 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.
  • A albi_63

    @paul53
    So Paul
    Jetzt habe ich alles so angepasst wie es sein muss. Habe das script mit dem SR04 Sensor getestet und, "oh staune", es klappt.
    Du bist der Beste, tausend Dank :innocent: :hugging_face:
    Im Anhang noch das fertige script:

    <xml xmlns="https://developers.google.com/blockly/xml">
     <variables>
       <variable id="QyKrT,r/Z.uEZuB1cCk6">Voll</variable>
       <variable id="S(r:dJ+2zJ_K^*ns[%8h">Leer</variable>
       <variable id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</variable>
       <variable id="qWVLn7Ak;m,K|)ybk+kg">Restzeit</variable>
     </variables>
     <block type="variables_set" id="-/BuYzQg0[woH]GqqkmV" x="38" y="38">
       <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
       <value name="VALUE">
         <block type="convert_from_date" id="@E9qvt%M_zlAE|3|:Mj">
           <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
           <field name="OPTION">object</field>
           <value name="VALUE">
             <block type="get_value" id="%g#U.;ImFrh34~Czzn%">
               <field name="ATTR">val</field>
               <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Voll</field>
             </block>
           </value>
         </block>
       </value>
       <next>
         <block type="on" id="{55TC3}K4a@l:4$@M,U$">
           <field name="OID">sonoff.0.Wassertank/WemosD1.SR04_Distance</field>
           <field name="CONDITION">ne</field>
           <field name="ACK_CONDITION"></field>
           <statement name="STATEMENT">
             <block type="controls_if" id="jp{,^R.Vr7#:6PH_$dZ(">
               <value name="IF0">
                 <block type="logic_operation" id="ZC1vr^8*rX!jy77q0luR">
                   <field name="OP">AND</field>
                   <value name="A">
                     <block type="logic_compare" id="tP3HSdaED,eW3Th9bku">
                       <field name="OP">LTE</field>
                       <value name="A">
                         <block type="on_source" id="^bnv/L~4N2zUJ/EOs{aK">
                           <field name="ATTR">state.val</field>
                         </block>
                       </value>
                       <value name="B">
                         <block type="math_number" id="]TnH[?LEi@ag6z/Pl:-">
                           <field name="NUM">21</field>
                         </block>
                       </value>
                     </block>
                   </value>
                   <value name="B">
                     <block type="logic_compare" id=".*-dan4oBu[5*I@Swff5">
                       <field name="OP">GT</field>
                       <value name="A">
                         <block type="on_source" id="K$:D!0`Y2I%P.$-Nvb!?">
                           <field name="ATTR">oldState.val</field>
                         </block>
                       </value>
                       <value name="B">
                         <block type="math_number" id=":DII$nq|U6*;TH22X4D}">
                           <field name="NUM">21</field>
                         </block>
                       </value>
                     </block>
                   </value>
                 </block>
               </value>
               <statement name="DO0">
                 <block type="variables_set" id="O=4X@^|$adiI^q*scv~3">
                   <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                   <value name="VALUE">
                     <block type="on_source" id="7Wkmj?g:@4}?o%R~=J;X">
                       <field name="ATTR">state.lc</field>
                     </block>
                   </value>
                   <next>
                     <block type="update" id="z^%m8=RBV218J=[!|/G">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                       <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Voll</field>
                       <field name="WITH_DELAY">FALSE</field>
                       <value name="VALUE">
                         <block type="convert_from_date" id="aF.d{;oE?N|V.N^3O?Lg">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                           <field name="OPTION">custom</field>
                           <field name="FORMAT">JJJJ.MM.TT SS:mm:ss</field>
                           <value name="VALUE">
                             <block type="variables_get" id="WI:]LM3-YGa8s+:4zrRQ">
                               <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <next>
                         <block type="telegram" id="1p.mr=8zIRf}BXy2,~TD">
                           <field name="INSTANCE"></field>
                           <field name="LOG"></field>
                           <field name="SILENT">FALSE</field>
                           <field name="PARSEMODE">default</field>
                           <value name="MESSAGE">
                             <shadow type="text" id="*rldG[s+n+4?Hv%`=e(V">
                               <field name="TEXT">text</field>
                             </shadow>
                             <block type="text_join" id="fb,%OO7l,[v7]4,z$gg:">
                               <mutation items="3"></mutation>
                               <value name="ADD0">
                                 <block type="text" id="/:PON)p~%~g~TqP(};v!">
                                   <field name="TEXT">Der Wassertank wurde am </field>
                                 </block>
                               </value>
                               <value name="ADD1">
                                 <block type="get_value" id="k;G4V{=C!bk5m|~B8TlC">
                                   <field name="ATTR">val</field>
                                   <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Voll</field>
                                 </block>
                               </value>
                               <value name="ADD2">
                                 <block type="text" id=")3HsTjlX8YJOhm:deQmf">
                                   <field name="TEXT"> gefüllt.</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                         </block>
                       </next>
                     </block>
                   </next>
                 </block>
               </statement>
               <next>
                 <block type="controls_if" id="s3pcZMzD*9}%R6rGX9cs">
                   <value name="IF0">
                     <block type="logic_operation" id="fe]*DHUv|Be7@%1fTNWz">
                       <field name="OP">AND</field>
                       <value name="A">
                         <block type="logic_compare" id="~@;s{nvZFR+h!nRAKGb8">
                           <field name="OP">GTE</field>
                           <value name="A">
                             <block type="on_source" id="gw5@LR7.5sA-$iT7pZX@">
                               <field name="ATTR">state.val</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="math_number" id="CaIX0%!CYQivKFqO~Ou(">
                               <field name="NUM">110</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <value name="B">
                         <block type="logic_compare" id="ti}P_tBRivXN/aNu:9Fw">
                           <field name="OP">LT</field>
                           <value name="A">
                             <block type="on_source" id=");aj?@zfWjF[:=/bW=:l">
                               <field name="ATTR">oldState.val</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="math_number" id="jjgusYbSD;6@-P;tl8K+">
                               <field name="NUM">110</field>
                             </block>
                           </value>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="variables_set" id="gXHSbLd-*=_JDmNEl">
                       <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                       <value name="VALUE">
                         <block type="on_source" id="h[X6_8+8x[JCPy9DEq}">
                           <field name="ATTR">state.lc</field>
                         </block>
                       </value>
                       <next>
                         <block type="update" id="[2[cL{Ua|eK:qZ^(CRoP">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Leer</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="convert_from_date" id="QDIgRy%}5wUrj@3MMoW/">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                               <field name="OPTION">custom</field>
                               <field name="FORMAT">JJJJ.MM.TT SS:mm:ss</field>
                               <value name="VALUE">
                                 <block type="variables_get" id="ECaK}:wet.T.pe:lBSi">
                                   <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <next>
                             <block type="variables_set" id="b}sNlY!L7iE,_ER:h]1Y">
                               <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                               <value name="VALUE">
                                 <block type="math_round" id="0nnYv?v$QA?..gN_X^#q">
                                   <field name="OP">ROUNDDOWN</field>
                                   <value name="NUM">
                                     <shadow type="math_number" id="c5,$:16H1bT-cf+;moF:">
                                       <field name="NUM">3.1</field>
                                     </shadow>
                                     <block type="math_arithmetic" id="o|Zy%2G/,HaU{)XJo?P" inline="false">
                                       <field name="OP">DIVIDE</field>
                                       <value name="A">
                                         <shadow type="math_number" id=")suP~j2q)26gS7.9,{[">
                                           <field name="NUM">1</field>
                                         </shadow>
                                         <block type="math_arithmetic" id="]x!sFAc$XT$n}vik|^2E">
                                           <field name="OP">MINUS</field>
                                           <value name="A">
                                             <shadow type="math_number">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="variables_get" id="}X5~oVvVh;LtbI;d(_0Q">
                                               <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                                             </block>
                                           </value>
                                           <value name="B">
                                             <shadow type="math_number">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="variables_get" id=":2JcyX$-f:2ocE;S)l5@">
                                               <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <shadow type="math_number" id="_-E7:Y6H*,,b5e3qdH}S">
                                           <field name="NUM">86400000</field>
                                         </shadow>
                                       </value>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                               <next>
                                 <block type="variables_set" id="KBIKf2YRpM{:%#n?Q">
                                   <field name="VAR" id="qWVLn7Ak;m,K|)ybk+kg">Restzeit</field>
                                   <value name="VALUE">
                                     <block type="math_arithmetic" id="BbO/)KNt2#)?|5=4J_+">
                                       <field name="OP">MINUS</field>
                                       <value name="A">
                                         <shadow type="math_number" id="4-GS=lP3h.#XLw.}c@@">
                                           <field name="NUM">1</field>
                                         </shadow>
                                         <block type="math_arithmetic" id="v)(k;?Zk!jW_S!PWI$Pt">
                                           <field name="OP">MINUS</field>
                                           <value name="A">
                                             <shadow type="math_number" id="Z,m#-rT3Xws-6F%Wby0">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="variables_get" id="aq1P9afQZ(Gj7xacgg%S">
                                               <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                                             </block>
                                           </value>
                                           <value name="B">
                                             <shadow type="math_number" id="c_D}!OO@RhR206Zi#qH">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="variables_get" id="@=p=s3Xd@!0!AyDnwOR">
                                               <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <shadow type="math_number" id=",)dgsw$E3)c+,bbY[ls7">
                                           <field name="NUM">1</field>
                                         </shadow>
                                         <block type="math_arithmetic" id="|yhqib-MuvJYdFtP+!2t">
                                           <field name="OP">MULTIPLY</field>
                                           <value name="A">
                                             <shadow type="math_number" id="yN!fz~;Et7r6xD{=Wn3b">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="variables_get" id="lmsK+|J1FexT+-BVgNK_">
                                               <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                             </block>
                                           </value>
                                           <value name="B">
                                             <shadow type="math_number" id="jq7@Dz?:VequK|F^;@si">
                                               <field name="NUM">86400000</field>
                                             </shadow>
                                           </value>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="variables_set" id="@$to!AA:!3r)YTw(M8w@">
                                       <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                       <value name="VALUE">
                                         <block type="text_join" id=",_l}mgscm0WIlT(=)qA">
                                           <mutation items="3"></mutation>
                                           <value name="ADD0">
                                             <block type="variables_get" id="Za[vF^ZYI8l|IL+e,Fx%">
                                               <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                             </block>
                                           </value>
                                           <value name="ADD1">
                                             <block type="text" id="orElMSg28TSabR{~Mq[">
                                               <field name="TEXT"> Tage </field>
                                             </block>
                                           </value>
                                           <value name="ADD2">
                                             <block type="convert_from_date" id="6U5O/X{y0dqn%u(Ut3_" inline="false">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                               <field name="OPTION">hh:mm:ss</field>
                                               <value name="VALUE">
                                                 <block type="math_arithmetic" id="QW/i!vUXb*H@qfM;z;ci" inline="false">
                                                   <field name="OP">ADD</field>
                                                   <value name="A">
                                                     <shadow type="math_number" id="VlPS%BH2i:Plhhh24mK^">
                                                       <field name="NUM">1</field>
                                                     </shadow>
                                                     <block type="variables_get" id="%xcj_vFN#c.wmDHKTt">
                                                       <field name="VAR" id="qWVLn7Ak;m,K|)ybk+kg">Restzeit</field>
                                                     </block>
                                                   </value>
                                                   <value name="B">
                                                     <shadow type="math_number" id="ae}2S1rscE%C]^fGP-{A">
                                                       <field name="NUM">1</field>
                                                     </shadow>
                                                     <block type="convert_from_date" id="BS_@AFOR/~XqgA2Qo;h(" inline="false">
                                                       <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                       <field name="OPTION">object</field>
                                                       <value name="VALUE">
                                                         <block type="text" id="B8[|sbLGSynC0]eae6jv">
                                                           <field name="TEXT">1970-01-01 00:00</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <next>
                                         <block type="update" id="Xh9:~6:6U8:~j:I_hy5u">
                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                           <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Anz_Tage</field>
                                           <field name="WITH_DELAY">FALSE</field>
                                           <value name="VALUE">
                                             <block type="text_join" id="ty!AHeO0jd#MR+Yf,KYU">
                                               <mutation items="2"></mutation>
                                               <value name="ADD0">
                                                 <block type="text" id="_E+FYD:XnDs+/v7Or#DK">
                                                   <field name="TEXT">Der Wassertank reichte </field>
                                                 </block>
                                               </value>
                                               <value name="ADD1">
                                                 <block type="variables_get" id="5bAUP@U9SX:+m1iDMhYF">
                                                   <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="telegram" id="S;]L}vZUyveWjFgtk0ft">
                                               <field name="INSTANCE"></field>
                                               <field name="LOG"></field>
                                               <field name="SILENT">FALSE</field>
                                               <field name="PARSEMODE">default</field>
                                               <value name="MESSAGE">
                                                 <shadow type="text" id="V7*Wd]Z%7G-s^uLr06/.">
                                                   <field name="TEXT">text</field>
                                                 </shadow>
                                                 <block type="text_join" id="AJ=O/^]z=_KNPcModUu%">
                                                   <mutation items="4"></mutation>
                                                   <value name="ADD0">
                                                     <block type="text" id="6o(;tNl-a|~cFL|Ug.^R">
                                                       <field name="TEXT">Der Wassertank ist leer seit </field>
                                                     </block>
                                                   </value>
                                                   <value name="ADD1">
                                                     <block type="get_value" id="MAH;/TMbltFf!?ztUE:3">
                                                       <field name="ATTR">val</field>
                                                       <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Leer</field>
                                                     </block>
                                                   </value>
                                                   <value name="ADD2">
                                                     <block type="text_newline" id="tu:(+934mUCU4uak|W-n">
                                                       <field name="Type">\n</field>
                                                     </block>
                                                   </value>
                                                   <value name="ADD3">
                                                     <block type="get_value" id="T,OMM$ZfT*p;B]qy{{@!">
                                                       <field name="ATTR">val</field>
                                                       <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Anz_Tage</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </statement>
                 </block>
               </next>
             </block>
           </statement>
         </block>
       </next>
     </block>
    </xml>
    


    Script für all diejenigen die es interessiert:
    Wassertank_Anz_Tage.jpg

    HomoranH Nicht stören
    HomoranH Nicht stören
    Homoran
    Global Moderator Administrators
    schrieb am zuletzt editiert von
    #13

    @albi_63 sagte in Anzahl Tage berechnen:

    Du bist der Beste

    kann hier jeder bestätigen!

    kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

    Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

    der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

    1 Antwort Letzte Antwort
    0
    • paul53P paul53

      @albi_63 sagte:

      Script:

      Der Trigger funktioniert so nicht. Korrektur:

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable id="QyKrT,r/Z.uEZuB1cCk6">Voll</variable>
         <variable id="S(r:dJ+2zJ_K^*ns[%8h">Leer</variable>
         <variable id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</variable>
         <variable id="qWVLn7Ak;m,K|)ybk+kg">Restzeit</variable>
       </variables>
       <block type="variables_set" id="-/BuYzQg0[woH]GqqkmV" x="38" y="38">
         <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
         <value name="VALUE">
           <block type="convert_from_date" id="@E9qvt%M_zlAE|3|:Mj">
             <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
             <field name="OPTION">object</field>
             <value name="VALUE">
               <block type="get_value" id="%g#U.;ImFrh34~Czzn%">
                 <field name="ATTR">val</field>
                 <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Voll</field>
               </block>
             </value>
           </block>
         </value>
         <next>
           <block type="on" id="{55TC3}K4a@l:4$@M,U$">
             <field name="OID">sonoff.0.Wassertank/WemosD1.SR04_Distance</field>
             <field name="CONDITION">ne</field>
             <field name="ACK_CONDITION"></field>
             <statement name="STATEMENT">
               <block type="controls_if" id="jp{,^R.Vr7#:6PH_$dZ(">
                 <value name="IF0">
                   <block type="logic_operation" id="ZC1vr^8*rX!jy77q0luR">
                     <field name="OP">AND</field>
                     <value name="A">
                       <block type="logic_compare" id="tP3HSdaED,eW3Th9bku">
                         <field name="OP">LTE</field>
                         <value name="A">
                           <block type="on_source" id="^bnv/L~4N2zUJ/EOs{aK">
                             <field name="ATTR">state.val</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="math_number" id="]TnH[?LEi@ag6z/Pl:-">
                             <field name="NUM">21</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <value name="B">
                       <block type="logic_compare" id=".*-dan4oBu[5*I@Swff5">
                         <field name="OP">GT</field>
                         <value name="A">
                           <block type="on_source" id="K$:D!0`Y2I%P.$-Nvb!?">
                             <field name="ATTR">oldState.val</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="math_number" id=":DII$nq|U6*;TH22X4D}">
                             <field name="NUM">21</field>
                           </block>
                         </value>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="variables_set" id="O=4X@^|$adiI^q*scv~3">
                     <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                     <value name="VALUE">
                       <block type="on_source" id="7Wkmj?g:@4}?o%R~=J;X">
                         <field name="ATTR">state.lc</field>
                       </block>
                     </value>
                     <next>
                       <block type="update" id="z^%m8=RBV218J=[!|/G">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Voll</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="convert_from_date" id="aF.d{;oE?N|V.N^3O?Lg">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                             <field name="OPTION">custom</field>
                             <field name="FORMAT">JJJJ.MM.TT SS:mm:ss</field>
                             <value name="VALUE">
                               <block type="variables_get" id="WI:]LM3-YGa8s+:4zrRQ">
                                 <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                               </block>
                             </value>
                           </block>
                         </value>
                       </block>
                     </next>
                   </block>
                 </statement>
                 <next>
                   <block type="controls_if" id="s3pcZMzD*9}%R6rGX9cs">
                     <value name="IF0">
                       <block type="logic_operation" id="fe]*DHUv|Be7@%1fTNWz">
                         <field name="OP">AND</field>
                         <value name="A">
                           <block type="logic_compare" id="~@;s{nvZFR+h!nRAKGb8">
                             <field name="OP">GTE</field>
                             <value name="A">
                               <block type="on_source" id="gw5@LR7.5sA-$iT7pZX@">
                                 <field name="ATTR">state.val</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="math_number" id="CaIX0%!CYQivKFqO~Ou(">
                                 <field name="NUM">110</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <value name="B">
                           <block type="logic_compare" id="ti}P_tBRivXN/aNu:9Fw">
                             <field name="OP">LT</field>
                             <value name="A">
                               <block type="on_source" id=");aj?@zfWjF[:=/bW=:l">
                                 <field name="ATTR">oldState.val</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="math_number" id="jjgusYbSD;6@-P;tl8K+">
                                 <field name="NUM">110</field>
                               </block>
                             </value>
                           </block>
                         </value>
                       </block>
                     </value>
                     <statement name="DO0">
                       <block type="variables_set" id="gXHSbLd-*=_JDmNEl">
                         <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                         <value name="VALUE">
                           <block type="on_source" id="h[X6_8+8x[JCPy9DEq}">
                             <field name="ATTR">state.lc</field>
                           </block>
                         </value>
                         <next>
                           <block type="update" id="[2[cL{Ua|eK:qZ^(CRoP">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                             <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Leer</field>
                             <field name="WITH_DELAY">FALSE</field>
                             <value name="VALUE">
                               <block type="convert_from_date" id="QDIgRy%}5wUrj@3MMoW/">
                                 <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                                 <field name="OPTION">custom</field>
                                 <field name="FORMAT">JJJJ.MM.TT SS:mm:ss</field>
                                 <value name="VALUE">
                                   <block type="variables_get" id="ECaK}:wet.T.pe:lBSi">
                                     <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <next>
                               <block type="variables_set" id="b}sNlY!L7iE,_ER:h]1Y">
                                 <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                 <value name="VALUE">
                                   <block type="math_round" id="0nnYv?v$QA?..gN_X^#q">
                                     <field name="OP">ROUNDDOWN</field>
                                     <value name="NUM">
                                       <shadow type="math_number" id="c5,$:16H1bT-cf+;moF:">
                                         <field name="NUM">3.1</field>
                                       </shadow>
                                       <block type="math_arithmetic" id="o|Zy%2G/,HaU{)XJo?P" inline="false">
                                         <field name="OP">DIVIDE</field>
                                         <value name="A">
                                           <shadow type="math_number" id=")suP~j2q)26gS7.9,{[">
                                             <field name="NUM">1</field>
                                           </shadow>
                                           <block type="math_arithmetic" id="]x!sFAc$XT$n}vik|^2E">
                                             <field name="OP">MINUS</field>
                                             <value name="A">
                                               <shadow type="math_number">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="variables_get" id="}X5~oVvVh;LtbI;d(_0Q">
                                                 <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <shadow type="math_number">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="variables_get" id=":2JcyX$-f:2ocE;S)l5@">
                                                 <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <shadow type="math_number" id="_-E7:Y6H*,,b5e3qdH}S">
                                             <field name="NUM">86400000</field>
                                           </shadow>
                                         </value>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="variables_set" id="KBIKf2YRpM{:%#n?Q">
                                     <field name="VAR" id="qWVLn7Ak;m,K|)ybk+kg">Restzeit</field>
                                     <value name="VALUE">
                                       <block type="math_arithmetic" id="BbO/)KNt2#)?|5=4J_+">
                                         <field name="OP">MINUS</field>
                                         <value name="A">
                                           <shadow type="math_number" id="4-GS=lP3h.#XLw.}c@@">
                                             <field name="NUM">1</field>
                                           </shadow>
                                           <block type="math_arithmetic" id="v)(k;?Zk!jW_S!PWI$Pt">
                                             <field name="OP">MINUS</field>
                                             <value name="A">
                                               <shadow type="math_number" id="Z,m#-rT3Xws-6F%Wby0">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="variables_get" id="aq1P9afQZ(Gj7xacgg%S">
                                                 <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <shadow type="math_number" id="c_D}!OO@RhR206Zi#qH">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="variables_get" id="@=p=s3Xd@!0!AyDnwOR">
                                                 <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <shadow type="math_number" id=",)dgsw$E3)c+,bbY[ls7">
                                             <field name="NUM">1</field>
                                           </shadow>
                                           <block type="math_arithmetic" id="|yhqib-MuvJYdFtP+!2t">
                                             <field name="OP">MULTIPLY</field>
                                             <value name="A">
                                               <shadow type="math_number" id="yN!fz~;Et7r6xD{=Wn3b">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="variables_get" id="lmsK+|J1FexT+-BVgNK_">
                                                 <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <shadow type="math_number" id="jq7@Dz?:VequK|F^;@si">
                                                 <field name="NUM">86400000</field>
                                               </shadow>
                                             </value>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="variables_set" id="@$to!AA:!3r)YTw(M8w@">
                                         <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                         <value name="VALUE">
                                           <block type="text_join" id=",_l}mgscm0WIlT(=)qA">
                                             <mutation items="3"></mutation>
                                             <value name="ADD0">
                                               <block type="variables_get" id="Za[vF^ZYI8l|IL+e,Fx%">
                                                 <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                               </block>
                                             </value>
                                             <value name="ADD1">
                                               <block type="text" id="orElMSg28TSabR{~Mq[">
                                                 <field name="TEXT"> Tage </field>
                                               </block>
                                             </value>
                                             <value name="ADD2">
                                               <block type="convert_from_date" id="6U5O/X{y0dqn%u(Ut3_" inline="false">
                                                 <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                 <field name="OPTION">hh:mm:ss</field>
                                                 <value name="VALUE">
                                                   <block type="math_arithmetic" id="QW/i!vUXb*H@qfM;z;ci" inline="false">
                                                     <field name="OP">ADD</field>
                                                     <value name="A">
                                                       <shadow type="math_number" id="VlPS%BH2i:Plhhh24mK^">
                                                         <field name="NUM">1</field>
                                                       </shadow>
                                                       <block type="variables_get" id="%xcj_vFN#c.wmDHKTt">
                                                         <field name="VAR" id="qWVLn7Ak;m,K|)ybk+kg">Restzeit</field>
                                                       </block>
                                                     </value>
                                                     <value name="B">
                                                       <shadow type="math_number" id="ae}2S1rscE%C]^fGP-{A">
                                                         <field name="NUM">1</field>
                                                       </shadow>
                                                       <block type="convert_from_date" id="BS_@AFOR/~XqgA2Qo;h(" inline="false">
                                                         <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                         <field name="OPTION">object</field>
                                                         <value name="VALUE">
                                                           <block type="text" id="B8[|sbLGSynC0]eae6jv">
                                                             <field name="TEXT">1970-01-01 00:00</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="update" id="Xh9:~6:6U8:~j:I_hy5u">
                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                             <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Anz_Tage</field>
                                             <field name="WITH_DELAY">FALSE</field>
                                             <value name="VALUE">
                                               <block type="text_join" id="ty!AHeO0jd#MR+Yf,KYU">
                                                 <mutation items="2"></mutation>
                                                 <value name="ADD0">
                                                   <block type="text" id="_E+FYD:XnDs+/v7Or#DK">
                                                     <field name="TEXT">Der Wassertank reichte </field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD1">
                                                   <block type="variables_get" id="5bAUP@U9SX:+m1iDMhYF">
                                                     <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </statement>
                   </block>
                 </next>
               </block>
             </statement>
           </block>
         </next>
       </block>
      </xml>
      

      @albi_63 sagte in Anzahl Tage berechnen:

      Wie funktioniert das mit Spoiler oder Export?

      Im Spoiler bitte noch Code tags verwenden.

      A Offline
      A Offline
      albi_63
      schrieb am zuletzt editiert von
      #14

      @paul53
      Hallo Paul
      Ich hoffe du bist wohl auf.......
      Beim letzten Script der Tagebrechnung meines Wassertankes hatten wir ja den Trigger mit Wert und verheriger Wert gesetzt.
      Wassertank-Anz-Tage-Trigger.jpg
      Jetzt kommt es leider zeitweise vor, dass der Trigger auslöst und mir das Startdatum neu setzt. Ich vermute dass der Sensor zeitweise Fehlmessungen verursacht und so den Trigger neu startet.
      Wenn ich jetzt die Range höher setze zb: Wert < 23 und vorheriger > 30, wird der Trigger nicht ausgelöst.
      Wie könnte man das definieren damit es trotzdem funktioniert?

      paul53P 1 Antwort Letzte Antwort
      0
      • paul53P paul53

        @albi_63 sagte:

        Script:

        Der Trigger funktioniert so nicht. Korrektur:

        <xml xmlns="https://developers.google.com/blockly/xml">
         <variables>
           <variable id="QyKrT,r/Z.uEZuB1cCk6">Voll</variable>
           <variable id="S(r:dJ+2zJ_K^*ns[%8h">Leer</variable>
           <variable id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</variable>
           <variable id="qWVLn7Ak;m,K|)ybk+kg">Restzeit</variable>
         </variables>
         <block type="variables_set" id="-/BuYzQg0[woH]GqqkmV" x="38" y="38">
           <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
           <value name="VALUE">
             <block type="convert_from_date" id="@E9qvt%M_zlAE|3|:Mj">
               <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
               <field name="OPTION">object</field>
               <value name="VALUE">
                 <block type="get_value" id="%g#U.;ImFrh34~Czzn%">
                   <field name="ATTR">val</field>
                   <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Voll</field>
                 </block>
               </value>
             </block>
           </value>
           <next>
             <block type="on" id="{55TC3}K4a@l:4$@M,U$">
               <field name="OID">sonoff.0.Wassertank/WemosD1.SR04_Distance</field>
               <field name="CONDITION">ne</field>
               <field name="ACK_CONDITION"></field>
               <statement name="STATEMENT">
                 <block type="controls_if" id="jp{,^R.Vr7#:6PH_$dZ(">
                   <value name="IF0">
                     <block type="logic_operation" id="ZC1vr^8*rX!jy77q0luR">
                       <field name="OP">AND</field>
                       <value name="A">
                         <block type="logic_compare" id="tP3HSdaED,eW3Th9bku">
                           <field name="OP">LTE</field>
                           <value name="A">
                             <block type="on_source" id="^bnv/L~4N2zUJ/EOs{aK">
                               <field name="ATTR">state.val</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="math_number" id="]TnH[?LEi@ag6z/Pl:-">
                               <field name="NUM">21</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <value name="B">
                         <block type="logic_compare" id=".*-dan4oBu[5*I@Swff5">
                           <field name="OP">GT</field>
                           <value name="A">
                             <block type="on_source" id="K$:D!0`Y2I%P.$-Nvb!?">
                               <field name="ATTR">oldState.val</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="math_number" id=":DII$nq|U6*;TH22X4D}">
                               <field name="NUM">21</field>
                             </block>
                           </value>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="variables_set" id="O=4X@^|$adiI^q*scv~3">
                       <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                       <value name="VALUE">
                         <block type="on_source" id="7Wkmj?g:@4}?o%R~=J;X">
                           <field name="ATTR">state.lc</field>
                         </block>
                       </value>
                       <next>
                         <block type="update" id="z^%m8=RBV218J=[!|/G">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Voll</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="convert_from_date" id="aF.d{;oE?N|V.N^3O?Lg">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                               <field name="OPTION">custom</field>
                               <field name="FORMAT">JJJJ.MM.TT SS:mm:ss</field>
                               <value name="VALUE">
                                 <block type="variables_get" id="WI:]LM3-YGa8s+:4zrRQ">
                                   <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                         </block>
                       </next>
                     </block>
                   </statement>
                   <next>
                     <block type="controls_if" id="s3pcZMzD*9}%R6rGX9cs">
                       <value name="IF0">
                         <block type="logic_operation" id="fe]*DHUv|Be7@%1fTNWz">
                           <field name="OP">AND</field>
                           <value name="A">
                             <block type="logic_compare" id="~@;s{nvZFR+h!nRAKGb8">
                               <field name="OP">GTE</field>
                               <value name="A">
                                 <block type="on_source" id="gw5@LR7.5sA-$iT7pZX@">
                                   <field name="ATTR">state.val</field>
                                 </block>
                               </value>
                               <value name="B">
                                 <block type="math_number" id="CaIX0%!CYQivKFqO~Ou(">
                                   <field name="NUM">110</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <value name="B">
                             <block type="logic_compare" id="ti}P_tBRivXN/aNu:9Fw">
                               <field name="OP">LT</field>
                               <value name="A">
                                 <block type="on_source" id=");aj?@zfWjF[:=/bW=:l">
                                   <field name="ATTR">oldState.val</field>
                                 </block>
                               </value>
                               <value name="B">
                                 <block type="math_number" id="jjgusYbSD;6@-P;tl8K+">
                                   <field name="NUM">110</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="variables_set" id="gXHSbLd-*=_JDmNEl">
                           <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                           <value name="VALUE">
                             <block type="on_source" id="h[X6_8+8x[JCPy9DEq}">
                               <field name="ATTR">state.lc</field>
                             </block>
                           </value>
                           <next>
                             <block type="update" id="[2[cL{Ua|eK:qZ^(CRoP">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                               <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Leer</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="convert_from_date" id="QDIgRy%}5wUrj@3MMoW/">
                                   <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                                   <field name="OPTION">custom</field>
                                   <field name="FORMAT">JJJJ.MM.TT SS:mm:ss</field>
                                   <value name="VALUE">
                                     <block type="variables_get" id="ECaK}:wet.T.pe:lBSi">
                                       <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                               <next>
                                 <block type="variables_set" id="b}sNlY!L7iE,_ER:h]1Y">
                                   <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                   <value name="VALUE">
                                     <block type="math_round" id="0nnYv?v$QA?..gN_X^#q">
                                       <field name="OP">ROUNDDOWN</field>
                                       <value name="NUM">
                                         <shadow type="math_number" id="c5,$:16H1bT-cf+;moF:">
                                           <field name="NUM">3.1</field>
                                         </shadow>
                                         <block type="math_arithmetic" id="o|Zy%2G/,HaU{)XJo?P" inline="false">
                                           <field name="OP">DIVIDE</field>
                                           <value name="A">
                                             <shadow type="math_number" id=")suP~j2q)26gS7.9,{[">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="math_arithmetic" id="]x!sFAc$XT$n}vik|^2E">
                                               <field name="OP">MINUS</field>
                                               <value name="A">
                                                 <shadow type="math_number">
                                                   <field name="NUM">1</field>
                                                 </shadow>
                                                 <block type="variables_get" id="}X5~oVvVh;LtbI;d(_0Q">
                                                   <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                                                 </block>
                                               </value>
                                               <value name="B">
                                                 <shadow type="math_number">
                                                   <field name="NUM">1</field>
                                                 </shadow>
                                                 <block type="variables_get" id=":2JcyX$-f:2ocE;S)l5@">
                                                   <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <value name="B">
                                             <shadow type="math_number" id="_-E7:Y6H*,,b5e3qdH}S">
                                               <field name="NUM">86400000</field>
                                             </shadow>
                                           </value>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="variables_set" id="KBIKf2YRpM{:%#n?Q">
                                       <field name="VAR" id="qWVLn7Ak;m,K|)ybk+kg">Restzeit</field>
                                       <value name="VALUE">
                                         <block type="math_arithmetic" id="BbO/)KNt2#)?|5=4J_+">
                                           <field name="OP">MINUS</field>
                                           <value name="A">
                                             <shadow type="math_number" id="4-GS=lP3h.#XLw.}c@@">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="math_arithmetic" id="v)(k;?Zk!jW_S!PWI$Pt">
                                               <field name="OP">MINUS</field>
                                               <value name="A">
                                                 <shadow type="math_number" id="Z,m#-rT3Xws-6F%Wby0">
                                                   <field name="NUM">1</field>
                                                 </shadow>
                                                 <block type="variables_get" id="aq1P9afQZ(Gj7xacgg%S">
                                                   <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                                                 </block>
                                               </value>
                                               <value name="B">
                                                 <shadow type="math_number" id="c_D}!OO@RhR206Zi#qH">
                                                   <field name="NUM">1</field>
                                                 </shadow>
                                                 <block type="variables_get" id="@=p=s3Xd@!0!AyDnwOR">
                                                   <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <value name="B">
                                             <shadow type="math_number" id=",)dgsw$E3)c+,bbY[ls7">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="math_arithmetic" id="|yhqib-MuvJYdFtP+!2t">
                                               <field name="OP">MULTIPLY</field>
                                               <value name="A">
                                                 <shadow type="math_number" id="yN!fz~;Et7r6xD{=Wn3b">
                                                   <field name="NUM">1</field>
                                                 </shadow>
                                                 <block type="variables_get" id="lmsK+|J1FexT+-BVgNK_">
                                                   <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                                 </block>
                                               </value>
                                               <value name="B">
                                                 <shadow type="math_number" id="jq7@Dz?:VequK|F^;@si">
                                                   <field name="NUM">86400000</field>
                                                 </shadow>
                                               </value>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <next>
                                         <block type="variables_set" id="@$to!AA:!3r)YTw(M8w@">
                                           <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                           <value name="VALUE">
                                             <block type="text_join" id=",_l}mgscm0WIlT(=)qA">
                                               <mutation items="3"></mutation>
                                               <value name="ADD0">
                                                 <block type="variables_get" id="Za[vF^ZYI8l|IL+e,Fx%">
                                                   <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                                 </block>
                                               </value>
                                               <value name="ADD1">
                                                 <block type="text" id="orElMSg28TSabR{~Mq[">
                                                   <field name="TEXT"> Tage </field>
                                                 </block>
                                               </value>
                                               <value name="ADD2">
                                                 <block type="convert_from_date" id="6U5O/X{y0dqn%u(Ut3_" inline="false">
                                                   <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                   <field name="OPTION">hh:mm:ss</field>
                                                   <value name="VALUE">
                                                     <block type="math_arithmetic" id="QW/i!vUXb*H@qfM;z;ci" inline="false">
                                                       <field name="OP">ADD</field>
                                                       <value name="A">
                                                         <shadow type="math_number" id="VlPS%BH2i:Plhhh24mK^">
                                                           <field name="NUM">1</field>
                                                         </shadow>
                                                         <block type="variables_get" id="%xcj_vFN#c.wmDHKTt">
                                                           <field name="VAR" id="qWVLn7Ak;m,K|)ybk+kg">Restzeit</field>
                                                         </block>
                                                       </value>
                                                       <value name="B">
                                                         <shadow type="math_number" id="ae}2S1rscE%C]^fGP-{A">
                                                           <field name="NUM">1</field>
                                                         </shadow>
                                                         <block type="convert_from_date" id="BS_@AFOR/~XqgA2Qo;h(" inline="false">
                                                           <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                           <field name="OPTION">object</field>
                                                           <value name="VALUE">
                                                             <block type="text" id="B8[|sbLGSynC0]eae6jv">
                                                               <field name="TEXT">1970-01-01 00:00</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="update" id="Xh9:~6:6U8:~j:I_hy5u">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                               <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Anz_Tage</field>
                                               <field name="WITH_DELAY">FALSE</field>
                                               <value name="VALUE">
                                                 <block type="text_join" id="ty!AHeO0jd#MR+Yf,KYU">
                                                   <mutation items="2"></mutation>
                                                   <value name="ADD0">
                                                     <block type="text" id="_E+FYD:XnDs+/v7Or#DK">
                                                       <field name="TEXT">Der Wassertank reichte </field>
                                                     </block>
                                                   </value>
                                                   <value name="ADD1">
                                                     <block type="variables_get" id="5bAUP@U9SX:+m1iDMhYF">
                                                       <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </statement>
                     </block>
                   </next>
                 </block>
               </statement>
             </block>
           </next>
         </block>
        </xml>
        

        @albi_63 sagte in Anzahl Tage berechnen:

        Wie funktioniert das mit Spoiler oder Export?

        Im Spoiler bitte noch Code tags verwenden.

        A Offline
        A Offline
        albi_63
        schrieb am zuletzt editiert von
        #15

        @paul53
        Ich habe mal den Sensor geloggt, dieser schwankt tatsächlich mal hoch mal runter

        30.018 	true 		2020-11-10 21:12:16.361 	
        30.035 	true 		2020-11-10 21:11:46.334 	
        30.018 	true 		2020-11-10 21:11:16.401 	
        30.018 	true 		2020-11-10 21:10:16.385 	
        30 	true 		2020-11-10 21:09:46.321 	
        30.035 	true 		2020-11-10 21:09:16.325 	
        29.561 	true 		2020-11-10 21:08:46.202 	
        29.579 	true 		2020-11-10 21:08:16.281 	
        29.579 	true 		2020-11-10 21:07:46.301 	
        30 	true 		2020-11-10 21:07:16.303 	
        29.982 	true 		2020-11-10 21:06:46.306 	
        29.579 	true 		2020-11-10 21:06:16.314 	
        30.035 	true 		2020-11-10 21:05:46.249 	
        30.053 	true 		2020-11-10 21:05:16.294 	
        30.018 	true 		2020-11-10 21:04:46.261 	
        29.579 	true 		2020-11-10 21:04:16.321 	
        29.561 	true 		2020-11-10 21:03:51.669 	
        null 	true 		2020-11-10 21:03:51.669
        
        1 Antwort Letzte Antwort
        0
        • paul53P paul53

          @albi_63 sagte:

          Script:

          Der Trigger funktioniert so nicht. Korrektur:

          <xml xmlns="https://developers.google.com/blockly/xml">
           <variables>
             <variable id="QyKrT,r/Z.uEZuB1cCk6">Voll</variable>
             <variable id="S(r:dJ+2zJ_K^*ns[%8h">Leer</variable>
             <variable id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</variable>
             <variable id="qWVLn7Ak;m,K|)ybk+kg">Restzeit</variable>
           </variables>
           <block type="variables_set" id="-/BuYzQg0[woH]GqqkmV" x="38" y="38">
             <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
             <value name="VALUE">
               <block type="convert_from_date" id="@E9qvt%M_zlAE|3|:Mj">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                 <field name="OPTION">object</field>
                 <value name="VALUE">
                   <block type="get_value" id="%g#U.;ImFrh34~Czzn%">
                     <field name="ATTR">val</field>
                     <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Voll</field>
                   </block>
                 </value>
               </block>
             </value>
             <next>
               <block type="on" id="{55TC3}K4a@l:4$@M,U$">
                 <field name="OID">sonoff.0.Wassertank/WemosD1.SR04_Distance</field>
                 <field name="CONDITION">ne</field>
                 <field name="ACK_CONDITION"></field>
                 <statement name="STATEMENT">
                   <block type="controls_if" id="jp{,^R.Vr7#:6PH_$dZ(">
                     <value name="IF0">
                       <block type="logic_operation" id="ZC1vr^8*rX!jy77q0luR">
                         <field name="OP">AND</field>
                         <value name="A">
                           <block type="logic_compare" id="tP3HSdaED,eW3Th9bku">
                             <field name="OP">LTE</field>
                             <value name="A">
                               <block type="on_source" id="^bnv/L~4N2zUJ/EOs{aK">
                                 <field name="ATTR">state.val</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="math_number" id="]TnH[?LEi@ag6z/Pl:-">
                                 <field name="NUM">21</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <value name="B">
                           <block type="logic_compare" id=".*-dan4oBu[5*I@Swff5">
                             <field name="OP">GT</field>
                             <value name="A">
                               <block type="on_source" id="K$:D!0`Y2I%P.$-Nvb!?">
                                 <field name="ATTR">oldState.val</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="math_number" id=":DII$nq|U6*;TH22X4D}">
                                 <field name="NUM">21</field>
                               </block>
                             </value>
                           </block>
                         </value>
                       </block>
                     </value>
                     <statement name="DO0">
                       <block type="variables_set" id="O=4X@^|$adiI^q*scv~3">
                         <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                         <value name="VALUE">
                           <block type="on_source" id="7Wkmj?g:@4}?o%R~=J;X">
                             <field name="ATTR">state.lc</field>
                           </block>
                         </value>
                         <next>
                           <block type="update" id="z^%m8=RBV218J=[!|/G">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                             <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Voll</field>
                             <field name="WITH_DELAY">FALSE</field>
                             <value name="VALUE">
                               <block type="convert_from_date" id="aF.d{;oE?N|V.N^3O?Lg">
                                 <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                                 <field name="OPTION">custom</field>
                                 <field name="FORMAT">JJJJ.MM.TT SS:mm:ss</field>
                                 <value name="VALUE">
                                   <block type="variables_get" id="WI:]LM3-YGa8s+:4zrRQ">
                                     <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </next>
                       </block>
                     </statement>
                     <next>
                       <block type="controls_if" id="s3pcZMzD*9}%R6rGX9cs">
                         <value name="IF0">
                           <block type="logic_operation" id="fe]*DHUv|Be7@%1fTNWz">
                             <field name="OP">AND</field>
                             <value name="A">
                               <block type="logic_compare" id="~@;s{nvZFR+h!nRAKGb8">
                                 <field name="OP">GTE</field>
                                 <value name="A">
                                   <block type="on_source" id="gw5@LR7.5sA-$iT7pZX@">
                                     <field name="ATTR">state.val</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id="CaIX0%!CYQivKFqO~Ou(">
                                     <field name="NUM">110</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <value name="B">
                               <block type="logic_compare" id="ti}P_tBRivXN/aNu:9Fw">
                                 <field name="OP">LT</field>
                                 <value name="A">
                                   <block type="on_source" id=");aj?@zfWjF[:=/bW=:l">
                                     <field name="ATTR">oldState.val</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id="jjgusYbSD;6@-P;tl8K+">
                                     <field name="NUM">110</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </value>
                         <statement name="DO0">
                           <block type="variables_set" id="gXHSbLd-*=_JDmNEl">
                             <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                             <value name="VALUE">
                               <block type="on_source" id="h[X6_8+8x[JCPy9DEq}">
                                 <field name="ATTR">state.lc</field>
                               </block>
                             </value>
                             <next>
                               <block type="update" id="[2[cL{Ua|eK:qZ^(CRoP">
                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                 <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Leer</field>
                                 <field name="WITH_DELAY">FALSE</field>
                                 <value name="VALUE">
                                   <block type="convert_from_date" id="QDIgRy%}5wUrj@3MMoW/">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                                     <field name="OPTION">custom</field>
                                     <field name="FORMAT">JJJJ.MM.TT SS:mm:ss</field>
                                     <value name="VALUE">
                                       <block type="variables_get" id="ECaK}:wet.T.pe:lBSi">
                                         <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="variables_set" id="b}sNlY!L7iE,_ER:h]1Y">
                                     <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                     <value name="VALUE">
                                       <block type="math_round" id="0nnYv?v$QA?..gN_X^#q">
                                         <field name="OP">ROUNDDOWN</field>
                                         <value name="NUM">
                                           <shadow type="math_number" id="c5,$:16H1bT-cf+;moF:">
                                             <field name="NUM">3.1</field>
                                           </shadow>
                                           <block type="math_arithmetic" id="o|Zy%2G/,HaU{)XJo?P" inline="false">
                                             <field name="OP">DIVIDE</field>
                                             <value name="A">
                                               <shadow type="math_number" id=")suP~j2q)26gS7.9,{[">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="math_arithmetic" id="]x!sFAc$XT$n}vik|^2E">
                                                 <field name="OP">MINUS</field>
                                                 <value name="A">
                                                   <shadow type="math_number">
                                                     <field name="NUM">1</field>
                                                   </shadow>
                                                   <block type="variables_get" id="}X5~oVvVh;LtbI;d(_0Q">
                                                     <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <shadow type="math_number">
                                                     <field name="NUM">1</field>
                                                   </shadow>
                                                   <block type="variables_get" id=":2JcyX$-f:2ocE;S)l5@">
                                                     <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <shadow type="math_number" id="_-E7:Y6H*,,b5e3qdH}S">
                                                 <field name="NUM">86400000</field>
                                               </shadow>
                                             </value>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="variables_set" id="KBIKf2YRpM{:%#n?Q">
                                         <field name="VAR" id="qWVLn7Ak;m,K|)ybk+kg">Restzeit</field>
                                         <value name="VALUE">
                                           <block type="math_arithmetic" id="BbO/)KNt2#)?|5=4J_+">
                                             <field name="OP">MINUS</field>
                                             <value name="A">
                                               <shadow type="math_number" id="4-GS=lP3h.#XLw.}c@@">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="math_arithmetic" id="v)(k;?Zk!jW_S!PWI$Pt">
                                                 <field name="OP">MINUS</field>
                                                 <value name="A">
                                                   <shadow type="math_number" id="Z,m#-rT3Xws-6F%Wby0">
                                                     <field name="NUM">1</field>
                                                   </shadow>
                                                   <block type="variables_get" id="aq1P9afQZ(Gj7xacgg%S">
                                                     <field name="VAR" id="S(r:dJ+2zJ_K^*ns[%8h">Leer</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <shadow type="math_number" id="c_D}!OO@RhR206Zi#qH">
                                                     <field name="NUM">1</field>
                                                   </shadow>
                                                   <block type="variables_get" id="@=p=s3Xd@!0!AyDnwOR">
                                                     <field name="VAR" id="QyKrT,r/Z.uEZuB1cCk6">Voll</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <shadow type="math_number" id=",)dgsw$E3)c+,bbY[ls7">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="math_arithmetic" id="|yhqib-MuvJYdFtP+!2t">
                                                 <field name="OP">MULTIPLY</field>
                                                 <value name="A">
                                                   <shadow type="math_number" id="yN!fz~;Et7r6xD{=Wn3b">
                                                     <field name="NUM">1</field>
                                                   </shadow>
                                                   <block type="variables_get" id="lmsK+|J1FexT+-BVgNK_">
                                                     <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <shadow type="math_number" id="jq7@Dz?:VequK|F^;@si">
                                                     <field name="NUM">86400000</field>
                                                   </shadow>
                                                 </value>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="variables_set" id="@$to!AA:!3r)YTw(M8w@">
                                             <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                             <value name="VALUE">
                                               <block type="text_join" id=",_l}mgscm0WIlT(=)qA">
                                                 <mutation items="3"></mutation>
                                                 <value name="ADD0">
                                                   <block type="variables_get" id="Za[vF^ZYI8l|IL+e,Fx%">
                                                     <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD1">
                                                   <block type="text" id="orElMSg28TSabR{~Mq[">
                                                     <field name="TEXT"> Tage </field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD2">
                                                   <block type="convert_from_date" id="6U5O/X{y0dqn%u(Ut3_" inline="false">
                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                     <field name="OPTION">hh:mm:ss</field>
                                                     <value name="VALUE">
                                                       <block type="math_arithmetic" id="QW/i!vUXb*H@qfM;z;ci" inline="false">
                                                         <field name="OP">ADD</field>
                                                         <value name="A">
                                                           <shadow type="math_number" id="VlPS%BH2i:Plhhh24mK^">
                                                             <field name="NUM">1</field>
                                                           </shadow>
                                                           <block type="variables_get" id="%xcj_vFN#c.wmDHKTt">
                                                             <field name="VAR" id="qWVLn7Ak;m,K|)ybk+kg">Restzeit</field>
                                                           </block>
                                                         </value>
                                                         <value name="B">
                                                           <shadow type="math_number" id="ae}2S1rscE%C]^fGP-{A">
                                                             <field name="NUM">1</field>
                                                           </shadow>
                                                           <block type="convert_from_date" id="BS_@AFOR/~XqgA2Qo;h(" inline="false">
                                                             <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                             <field name="OPTION">object</field>
                                                             <value name="VALUE">
                                                               <block type="text" id="B8[|sbLGSynC0]eae6jv">
                                                                 <field name="TEXT">1970-01-01 00:00</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="update" id="Xh9:~6:6U8:~j:I_hy5u">
                                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                 <field name="OID">javascript.0.Eigene_Datenpunkte.Wassertank.Anz_Tage</field>
                                                 <field name="WITH_DELAY">FALSE</field>
                                                 <value name="VALUE">
                                                   <block type="text_join" id="ty!AHeO0jd#MR+Yf,KYU">
                                                     <mutation items="2"></mutation>
                                                     <value name="ADD0">
                                                       <block type="text" id="_E+FYD:XnDs+/v7Or#DK">
                                                         <field name="TEXT">Der Wassertank reichte </field>
                                                       </block>
                                                     </value>
                                                     <value name="ADD1">
                                                       <block type="variables_get" id="5bAUP@U9SX:+m1iDMhYF">
                                                         <field name="VAR" id="}wmbN}pP_^UnXdMM~xr6">Anz_Tage</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </statement>
                       </block>
                     </next>
                   </block>
                 </statement>
               </block>
             </next>
           </block>
          </xml>
          

          @albi_63 sagte in Anzahl Tage berechnen:

          Wie funktioniert das mit Spoiler oder Export?

          Im Spoiler bitte noch Code tags verwenden.

          A Offline
          A Offline
          albi_63
          schrieb am zuletzt editiert von
          #16

          @paul53
          Hallo Paul
          Könnte mein Trigger so funktionieren?
          Wassertank-Anz-Tage-Trigger1.jpg

          1 Antwort Letzte Antwort
          0
          • A albi_63

            @paul53
            Hallo Paul
            Ich hoffe du bist wohl auf.......
            Beim letzten Script der Tagebrechnung meines Wassertankes hatten wir ja den Trigger mit Wert und verheriger Wert gesetzt.
            Wassertank-Anz-Tage-Trigger.jpg
            Jetzt kommt es leider zeitweise vor, dass der Trigger auslöst und mir das Startdatum neu setzt. Ich vermute dass der Sensor zeitweise Fehlmessungen verursacht und so den Trigger neu startet.
            Wenn ich jetzt die Range höher setze zb: Wert < 23 und vorheriger > 30, wird der Trigger nicht ausgelöst.
            Wie könnte man das definieren damit es trotzdem funktioniert?

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

            @albi_63 sagte:

            dass der Trigger auslöst und mir das Startdatum neu setzt.

            Ist es ein Problem, wenn als Startdatum die Zeit des letzten Unterschreiten des Grenzwertes verwendet wird (außer das die Telegram-Meldung mehrfach kommt) ? Offenbar schwankt der Pegel etwas.

            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

            A 1 Antwort Letzte Antwort
            0
            • paul53P paul53

              @albi_63 sagte:

              dass der Trigger auslöst und mir das Startdatum neu setzt.

              Ist es ein Problem, wenn als Startdatum die Zeit des letzten Unterschreiten des Grenzwertes verwendet wird (außer das die Telegram-Meldung mehrfach kommt) ? Offenbar schwankt der Pegel etwas.

              A Offline
              A Offline
              albi_63
              schrieb am zuletzt editiert von
              #18

              @paul53
              Hy Paul
              Wenn er mir das Startdatum ändert, dann stimmt doch die Berechnung nicht mehr, wie lange der Tank reichte.
              Oder liege ich hier falsch.

              paul53P 1 Antwort Letzte Antwort
              0
              • A albi_63

                @paul53
                Hy Paul
                Wenn er mir das Startdatum ändert, dann stimmt doch die Berechnung nicht mehr, wie lange der Tank reichte.
                Oder liege ich hier falsch.

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

                @albi_63 sagte:

                stimmt doch die Berechnung nicht mehr, wie lange der Tank reichte.

                Solange der Wert um 30 schwankt, ist der Tank voll. Oder ?

                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

                A 2 Antworten Letzte Antwort
                0
                • paul53P paul53

                  @albi_63 sagte:

                  stimmt doch die Berechnung nicht mehr, wie lange der Tank reichte.

                  Solange der Wert um 30 schwankt, ist der Tank voll. Oder ?

                  A Offline
                  A Offline
                  albi_63
                  schrieb am zuletzt editiert von
                  #20

                  @paul53
                  Ja

                  1 Antwort Letzte Antwort
                  0
                  • paul53P paul53

                    @albi_63 sagte:

                    stimmt doch die Berechnung nicht mehr, wie lange der Tank reichte.

                    Solange der Wert um 30 schwankt, ist der Tank voll. Oder ?

                    A Offline
                    A Offline
                    albi_63
                    schrieb am zuletzt editiert von
                    #21

                    @paul53
                    Aber wenn der Tankinhalt fällt, zb, auf 50cm , dann wird der Sensor mir wieder ein wenig auf und ab varieren und das reicht aus um das Startdatum wieder zu ändern

                    paul53P 1 Antwort Letzte Antwort
                    0
                    • A albi_63

                      @paul53
                      Aber wenn der Tankinhalt fällt, zb, auf 50cm , dann wird der Sensor mir wieder ein wenig auf und ab varieren und das reicht aus um das Startdatum wieder zu ändern

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

                      @albi_63 sagte:

                      wenn der Tankinhalt fällt, zb, auf 50cm

                      Was sind 50 cm ? Fast voll ?
                      Wenn der Wert über 30 bleibt, wird das Startdatum nicht mehr geändert.

                      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

                      A 1 Antwort Letzte Antwort
                      0
                      • paul53P paul53

                        @albi_63 sagte:

                        wenn der Tankinhalt fällt, zb, auf 50cm

                        Was sind 50 cm ? Fast voll ?
                        Wenn der Wert über 30 bleibt, wird das Startdatum nicht mehr geändert.

                        A Offline
                        A Offline
                        albi_63
                        schrieb am zuletzt editiert von
                        #23

                        @paul53
                        Der Wert steigt dauernd mit jedem Verbrauch. 30 cm voll, 110 cm leer

                        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

                        593

                        Online

                        32.7k

                        Benutzer

                        82.4k

                        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