Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • 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

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Praktische Anwendungen (Showcase)
  4. [GELÖST] Frage: Batteriestatus bzw. Ladezustand

NEWS

  • Neuer ioBroker-Blog online: Monatsrückblick März/April 2026
    BluefoxB
    Bluefox
    5
    1
    112

  • Verwendung von KI bitte immer deutlich kennzeichnen
    HomoranH
    Homoran
    8
    1
    154

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    865

[GELÖST] Frage: Batteriestatus bzw. Ladezustand

Scheduled Pinned Locked Moved Praktische Anwendungen (Showcase)
68 Posts 13 Posters 25.2k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tomdeboom
    wrote on last edited by
    #49

    const idPlug = 'hm-rpc.1.OEQ0171991.1.STATE'; // Ladegerät ein

    Das wäre das Gerät.

    Und so wird es eingeschaltet:

    if(plug) state = 7; // Ladegerät ein setState(idVis, state, true);

    <size size="85">CCU2 | QNAP TVS-473 64GB | VM Lubunto iBroker | Echo 2\. Gen. | LAN/Wifi | 18 Geräte</size>

    1 Reply Last reply
    0
    • smartboartS Offline
      smartboartS Offline
      smartboart
      wrote on last edited by
      #50

      sorry dass ich weiter Frage, aber wo wird der status 7 gesetzt, ab wann geladen wird? Bei mir funktioniert nur die Anzeige gut. Wenn ich manuel lade also das Ladegerät über mein Objekt true schalte wird auch das Ladesymbol gezeigt….aber von selbst schaltet da garnichts...

      const idBatt ='vis.0.Smartboard.battery.level'; //Batterielevel in %
      const idPlug ='sonoff.0.Schalter_Smartboard.POWER2';// Ladegerät ein
      const idVis ='Batterieanzeige'; //Für Vis
      
      createState(idVis, 0, {
         type: 'number',
         min: 0,
         max: 7,
         role: 'level',
         states: {
            0: 'leer',
            1: '10 %',
            2: '20 %',
            3: '40 %',
            4: '60 %',
            5: '80 %',
            6: 'voll',
            7: 'Ladegerät'
         }   
      });
      
      var level = getState(idBatt).val;
      var plug = getState(idPlug).val;
      
      function batt() {
         var state = 6;  // full
         if(level < 100) state = 5;  // 80 %
         if(level < 80) state = 4; // 60 %
         if(level < 60) state = 3; // 40 %
         if(level < 40) state = 2; // 20 %
         if(level < 20) state = 1; // 10 %
         if(level < 10) state = 0; // empty
         if(plug) state = 7;  // Ladegerät ein
         setState(idVis, state, true);
      }
      
      batt(); // Skriptstart
      
      on(idBatt, function(dp) {
         level = dp.state.val;
         batt();
      });
      
      1 Reply Last reply
      0
      • T Offline
        T Offline
        tomdeboom
        wrote on last edited by
        #51

        zeige mal alle Einträge von dem Objekt "sonoff.0.Schalter_Smartboard"

        Gruß,

        Tom

        <size size="85">CCU2 | QNAP TVS-473 64GB | VM Lubunto iBroker | Echo 2\. Gen. | LAN/Wifi | 18 Geräte</size>

        1 Reply Last reply
        0
        • smartboartS Offline
          smartboartS Offline
          smartboart
          wrote on last edited by
          #52

          Danke für die Unterstützung

          6558_unbenannt.jpg
          6558_unbenannt.jpg
          6558_20180415_125518.jpg

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tempestas
            wrote on last edited by
            #53

            Das kann auch nicht von selbst angehen, da war kein Trigger für den Plug

            const idBatt ='vis.0.Smartboard.battery.level'; //Batterielevel in %
            const idPlug ='sonoff.0.Schalter_Smartboard.POWER2';// Ladegerät ein
            const idVis ='Batterieanzeige'; //Für Vis
            
            createState(idVis, 0, {
               type: 'number',
               min: 0,
               max: 7,
               role: 'level',
               states: {
                  0: 'leer',
                  1: '10 %',
                  2: '20 %',
                  3: '40 %',
                  4: '60 %',
                  5: '80 %',
                  6: 'voll',
                  7: 'Ladegerät'
               }   
            });
            
            var level = getState(idBatt).val;
            var plug = getState(idPlug).val;
            
            function batt() {
               var state = 6;  // full
               if(level < 100) state = 5;  // 80 %
               if(level < 80) state = 4; // 60 %
               if(level < 60) state = 3; // 40 %
               if(level < 40) state = 2; // 20 %
               if(level < 20) state = 1; // 10 %
               if(level < 10) state = 0; // empty
               if(plug) state = 7;  // Ladegerät ein
               setState(idVis, state, true);
            
               if(level == 80) setState(idPlug, false);
               if(level == 20) setState(idPlug, true);	
            
            }
            
            batt(); // Skriptstart
            
            on(idBatt, function(dp) {
               level = dp.state.val;
               batt();
            });
            

            <size="85">ioBroker | 21 Adapter | Ubuntu Server | intel NUC | Homematic CCU2 | Hue | Osram Lightify| Sonos | 2x Instar Cam | Samsung Tab A 2016 im Holzrahmen| 3x Echo dot | 1x Echo | Neato Botvac D5</size>

            1 Reply Last reply
            0
            • smartboartS Offline
              smartboartS Offline
              smartboart
              wrote on last edited by
              #54

              ja, das ist das was ich ein paar Beiträge vorher schon gefragt habe..dort wurde immr erzählt, es würde schon geschaltet…dort hatte ich auch eine ergänzung zum thema schalten gemacht....jetzt ergibt das auch einen sinn für mich.

              Vielen vielen Dank...

              if(level >= 80) setState(idPlug, false);

              if(level <= 20) setState(idPlug, true);

              würde das noch mit > und < ergänze...

              wie gesagt, hatte auf dem Schlauch gestanden, weil immer wieder die Rede davon war es würde bereits geschaltet...

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tempestas
                wrote on last edited by
                #55

                Gern geschehen.

                Ergänz es wie du willst, aber warum willst du ständig den Befehl senden? Mehr als ein oder aus kann es ja nicht sein, wie ich auch schon weiter oben vor einiger Zeit an dich schrieb.

                Warum also den Plug bei 20% einschalten und bei 21% auch wieder einschalten und bei 22% usw…?

                <size="85">ioBroker | 21 Adapter | Ubuntu Server | intel NUC | Homematic CCU2 | Hue | Osram Lightify| Sonos | 2x Instar Cam | Samsung Tab A 2016 im Holzrahmen| 3x Echo dot | 1x Echo | Neato Botvac D5</size>

                1 Reply Last reply
                0
                • smartboartS Offline
                  smartboartS Offline
                  smartboart
                  wrote on last edited by
                  #56

                  nein ich habe ein tablet wallmount, siehe Foto oben,es ist herausnehmbar aber mehr oder weniger fest installiert und in der UP Dose hinter dem Sonoff Schalter wird das Ladegerät versorgt …ich will nicht ständig manuell ein und ausschalten und will auch nicht, dass das Laderät permanent an ist. Deshalb möchte ich das es sich selbständig läd und entläd. und dabei ein gewisses batterieschonendes Level hält, so um die 70%...

                  Dein super script ist ja eigentlich nur für die Zustandsanzeige der Batterie...auf dieser Basis wollte ich halt noch ein und ausschalten..

                  Mit diesem Eintrag funktioniert auch die Ladeanzeige wieder...

                  if(level >= 70) setState('sonoff.0.Schalter_Smartboard.POWER2', false );

                  if(level <= 60) setState('sonoff.0.Schalter_Smartboard.POWER2', true );

                  Damit schaltet zwar der sonoff, aber die Ladeanzeige wurde nicht angezeigt...

                  if(level == 80) setState(idPlug, false);

                  if(level == 20) setState(idPlug, true);

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tomdeboom
                    wrote on last edited by
                    #57

                    sorry dann hatte ich dich falsch verstanden.

                    Und das Orginal Script schaltet bei mir mein USB Ladegerät ein sobald der Akkustand unter 20% ist und wieder ab sobald der Akku vom Tablett 80% erreicht hat.

                    Gruß,

                    Tom

                    <size size="85">CCU2 | QNAP TVS-473 64GB | VM Lubunto iBroker | Echo 2\. Gen. | LAN/Wifi | 18 Geräte</size>

                    1 Reply Last reply
                    0
                    • paul53P Offline
                      paul53P Offline
                      paul53
                      wrote on last edited by
                      #58

                      @tempestas:

                      if(plug) state = 7; // Ladegerät ein
                      ```` `  
                      

                      macht nur Sinn, wenn das Ladegerät manuell geschaltet wird. Bei manueller Schaltung:

                         if(level < 10) state = 0; // empty
                         if(plug) state = 7;  // Ladegerät ein
                         setState(idVis, state, true);
                      }
                      
                      batt(); // Skriptstart
                      
                      on(idBatt, function(dp) {
                         level = dp.state.val;
                         batt();
                      });
                      on(idPlug, function(dp) {
                         plug = dp.state.val;
                         batt();
                      });
                      

                      oder bei automatischer Schaltung:

                         if(level < 10) state = 0; // empty
                         setState(idVis, state, true);
                         if(level >= 80 && plug) setState(idPlug, false);
                         if(level <= 60 && !plug) setState(idPlug, true);
                      }
                      
                      batt(); // Skriptstart
                      
                      on(idBatt, function(dp) {
                         level = dp.state.val;
                         batt();
                      });
                      on(idPlug, function(dp) {
                         plug = dp.state.val;
                         batt();
                      });
                      

                      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

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Snatch
                        wrote on last edited by
                        #59

                        Hallo,

                        erst mal danke für das ganze hier. Leider wechseln bei mir die Bilder nicht. Ich möchte gerne den Status meiner Xiaomi Geräte anzeigen lassen.

                        Das Script habe ich angepasst:

                        // Batterieanzeige
                        "*/20 * * * *"
                        const idBatt = 'mihome.0.devices.smoke_158d0001e5bf74.percent'; // Batterielevel in %
                        const idVis = 'Batterieanzeige'; // Für Vis
                        
                        createState(idVis, 0, {
                        type: 'number',
                        min: 0,
                        max: 6,
                        role: 'level',
                        states: {
                        0: 'Leer',
                        1: '20 %',
                        2: '40 %',
                        3: '60 %',
                        4: '50 %',
                        5: 'voll',
                        }
                        });
                        
                        var level = getState(idBatt).val;
                        
                        function batt() {
                        var state = 5; // full
                        if(level <= 100) state = 5; // 100 %
                        if(level <= 80) state = 5; // 80 %
                        if(level <= 60) state = 5; // 60 %
                        if(level <= 40) state = 5; // 40 %
                        if(level <= 22) state = 5; // 20 %
                        if(level <= 10) state = 5; // 0 %
                        }
                        
                        batt(); // Skriptstart
                        
                        on(idBatt, function(dp) {
                        level = dp.state.val;
                        batt();
                        });
                        

                        Ich habe im VIS auch für jeden state ein Bild hinterlegt und das Script Objekt ID angegeben. Er zeigt mir aber immer das 20 % PNG obwohl der Ladezustand bei > 90 % liegt.

                        Kann mir da bitte jemand helfen?

                        Grüße
                        1955_ladezustand.png
                        1955_vis_eintr_ge.png

                        1 Reply Last reply
                        0
                        • T Offline
                          T Offline
                          tempestas
                          wrote on last edited by
                          #60

                          Du hast in dem Skript egal bei welchem Ladestand immer Zustand = 5 angegeben..damit ändert sich nie etwas.

                          Interessant wäre ein Screenshot von dem state, auf das du verlinkt. Da müsste 5 stehen und damit immer voll angezeigt werden, nicht 20%

                          Der sollte unter Javascript.0.idVis liegen, ohne Script enabled

                          <size="85">ioBroker | 21 Adapter | Ubuntu Server | intel NUC | Homematic CCU2 | Hue | Osram Lightify| Sonos | 2x Instar Cam | Samsung Tab A 2016 im Holzrahmen| 3x Echo dot | 1x Echo | Neato Botvac D5</size>

                          1 Reply Last reply
                          0
                          • paul53P Offline
                            paul53P Offline
                            paul53
                            wrote on last edited by
                            #61

                            @Snatch:

                            Das Script habe ich angepasst: `
                            So, dass es nicht mehr funktioniert. Bitte korrigieren

                            function batt() {
                              var state = 5; // full
                              if(level <= 80) state = 4; // 80 %
                              if(level <= 60) state = 3; // 60 %
                              if(level <= 40) state = 2; // 40 %
                              if(level <= 22) state = 1; // 20 %
                              if(level <= 10) state = 0; // 0 %
                              setState(idVis, state, true);
                            }
                            
                            

                            Die Datenpunkt-ID für VIS ist <u>nicht</u> javascript.0.scriptEnabled.Wartung.Batterie_Status_Rauchmelder_ , sondern javascript.0.Batterieanzeige.

                            Die zweite Zeile im Skript bitte löschen !

                            "*/20 * * * *"
                            

                            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

                            1 Reply Last reply
                            0
                            • H Offline
                              H Offline
                              hauwech
                              wrote on last edited by
                              #62

                              Hallo zusammen,

                              kann man das script auch so umbauen, daß man das Device als Parameter z.B. in VIS in der Objekt-ID übergeben könnte?

                              Ich habe etwa 50 Devices (überwiegend HomeMatic), deren Batteriestatus ich überwachen möchte. Einige davon liefern nur "battery=low/ok", andere liefern "batteryLevel=2.x..3,x".

                              Diejenigen, die nur low/ok liefern, könnte man mit einem "Basic - bulb on/off" abfrühstücken, aber da bleiben immer noch über zwanzig, die einen batteryLevel liefern, den man besser aufgelöst visualisieren könnte.

                              Gruß Roland

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                Snatch
                                wrote on last edited by
                                #63

                                Hallo,

                                ich habe zu diesem Script mal eine Frage.

                                Erst mal vielen Dank, es läuft Super und funktioniert bei mir 1A.

                                Leider kann man die Variablen nur 1x vergeben. Ich habe also für jeden Sensor den ich überwachen möchte in extra Script mit fortlaufenden Nummern:

                                idVis01…

                                idVis02...

                                etc.

                                Sonst meckert er rum und sagt, diese Variablen wurden schon vergeben. Gibt es eine Möglichkeit das einfacher zu lösen, wenn man viele Geräte damit auslesen möchte?

                                Grüße

                                1 Reply Last reply
                                0
                                • J Offline
                                  J Offline
                                  joicevs
                                  wrote on last edited by
                                  #64

                                  Jetzt hätte ich hier auch mal eine Frage, wie bekomme ich eigentlich die Werte der Batterie in ioBroker rein?? Mit was wird also die Voltzahl übergeben??

                                  1 Reply Last reply
                                  0
                                  • JB_SullivanJ Offline
                                    JB_SullivanJ Offline
                                    JB_Sullivan
                                    wrote on last edited by
                                    #65

                                    Kurze, dumme Frage von mir. Was habe ich falsch gemacht, das bei jeder Aktualisierung des Fully Datenpunkt die Steckdose für das Netzteil kurz an und sofort wieder aus geht? Dabei ist es egal ob ob das Tablett angeschlossen ist oder nicht.

                                    const idBatt ='fullybrowser.0.10_xxx_xxx_xxx.Info.batteryLevel'; //Batterielevel in %
                                    const idPlug ='sonoff.0.Stube.POWER1';// Ladegerät ein
                                    const idVis ='Batterieanzeige'; //Für Vis
                                    
                                    createState(idVis, 0, {
                                       type: 'number',
                                       min: 0,
                                       max: 6,
                                       role: 'level',
                                       states: {
                                          0: 'leer',
                                          1: '20 %',
                                          2: '40 %',
                                          3: '60 %',
                                          4: '80 %',
                                          5: 'voll',
                                          6: 'Ladegerät'
                                       }   
                                    });
                                    
                                    var level = getState(idBatt).val;
                                    var plug = getState(idPlug).val;
                                    
                                    function batt() {
                                       var state = 5;  // full
                                       if(level < 100) state = 4;  // 80 %
                                       if(level < 80) state = 3; // 60 %
                                       if(level < 60) state = 2; // 40 %
                                       if(level < 40) state = 1; // 20 %
                                       if(level < 10) state = 0; // empty
                                       setState(idVis, state, true);
                                       if(level >= 80 && plug) setState(idPlug, false);
                                       if(level <= 60 && !plug) setState(idPlug, true);
                                    }
                                    
                                    batt(); // Skriptstart
                                    
                                    on(idBatt, function(dp) {
                                       level = dp.state.val;
                                       batt();
                                    });
                                    on(idPlug, function(dp) {
                                       plug = dp.state.val;
                                       batt();
                                    });
                                    

                                    ioBroker (since 2018) auf Intel Core i3-5005U NUC und Windwos10 Pro

                                    1 Reply Last reply
                                    0
                                    • T Offline
                                      T Offline
                                      tempestas
                                      wrote on last edited by
                                      #66

                                      das Problem habe ich auch (anderes skropt). scheinbar sendet fully beim auslesen des batteriewerts einmal "null" und dann den neuen wert. dadurch weird das script doppelt getriggert und bei "null" geht die steckdose aus

                                      <size="85">ioBroker | 21 Adapter | Ubuntu Server | intel NUC | Homematic CCU2 | Hue | Osram Lightify| Sonos | 2x Instar Cam | Samsung Tab A 2016 im Holzrahmen| 3x Echo dot | 1x Echo | Neato Botvac D5</size>

                                      1 Reply Last reply
                                      0
                                      • arteckA Offline
                                        arteckA Offline
                                        arteck
                                        Developer Most Active
                                        wrote on last edited by
                                        #67

                                        war ein bug im Adapter

                                        zigbee hab ich, zwave auch, nuc's genauso und HA auch

                                        1 Reply Last reply
                                        0
                                        • madingM Online
                                          madingM Online
                                          mading
                                          wrote on last edited by
                                          #68

                                          Hi,

                                          Ich habe es mir einfach gemacht und ein Blockly geschrieben, das den Icon Pfad in einen eigenen Datenpunkt schreibt. In der vis referenziere ich als Bildpfad auf den DP.

                                          
                                          <xml xmlns="https://developers.google.com/blockly/xml">
                                            <variables>
                                              <variable id="-5qE{53gUXm~XDoCvrx4">SoC</variable>
                                              <variable id="y;5+d8!WE-yi(I534HSb">EAutoKapa</variable>
                                              <variable id="V=[CbG9$B2^z*A$.tROA">SoC100</variable>
                                              <variable id="u,9.sks(Ks9Y9sJnRH{K">ReichweiteEAuto</variable>
                                            </variables>
                                            <block type="comment" id="}qR0o?gc,*}R%HVXV.=x" x="-762" y="-487">
                                              <field name="COMMENT">Setzen des richtigen Icons für das Batterielevel</field>
                                              <next>
                                                <block type="comment" id="/$aM6UxFi|}qDJZA*`/Q">
                                                  <field name="COMMENT">Sowie Restreichweite berechnen</field>
                                                  <next>
                                                    <block type="schedule" id="mp^O#T~*ho++g$_mP..I">
                                                      <field name="SCHEDULE">* * * * *</field>
                                                      <statement name="STATEMENT">
                                                        <block type="variables_set" id="zX!]]~l%4iRSAc,8e]0d">
                                                          <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                          <value name="VALUE">
                                                            <block type="get_value" id="G75uGiKYgGJV$7_9kWXg">
                                                              <field name="ATTR">val</field>
                                                              <field name="OID">mqtt.0.openWB.lp.1.%Soc</field>
                                                            </block>
                                                          </value>
                                                          <next>
                                                            <block type="variables_set" id="}0dd:6n-XMsq:O=,_-DP">
                                                              <field name="VAR" id="y;5+d8!WE-yi(I534HSb">EAutoKapa</field>
                                                              <value name="VALUE">
                                                                <block type="get_value" id=".BG?-S8H/AA%+Z:x}A0y">
                                                                  <field name="ATTR">val</field>
                                                                  <field name="OID">0_userdata.0.EigeneDatenpunkte.openWB.EAutoBatterieKapazitaet</field>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="variables_set" id="F4Nz4Cgliag+LWr,S?)M">
                                                                  <field name="VAR" id="V=[CbG9$B2^z*A$.tROA">SoC100</field>
                                                                  <value name="VALUE">
                                                                    <block type="math_arithmetic" id="V).1*yaTQ,8p@]c{1X;%">
                                                                      <field name="OP">DIVIDE</field>
                                                                      <value name="A">
                                                                        <shadow type="math_number" id="X4YcJG^S@j?XRh238_($">
                                                                          <field name="NUM">1</field>
                                                                        </shadow>
                                                                        <block type="variables_get" id="al/$emS[R3nc.x(Ge#MH">
                                                                          <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="B">
                                                                        <shadow type="math_number" id="nYT*Q0J?4_.H(o6(|M:;">
                                                                          <field name="NUM">100</field>
                                                                        </shadow>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                  <next>
                                                                    <block type="variables_set" id="Tsy9JA(k6%#8Bh}LlN9^">
                                                                      <field name="VAR" id="u,9.sks(Ks9Y9sJnRH{K">ReichweiteEAuto</field>
                                                                      <value name="VALUE">
                                                                        <block type="math_arithmetic" id="G5asy9ct3aE,]#O`RlB:">
                                                                          <field name="OP">MULTIPLY</field>
                                                                          <value name="A">
                                                                            <shadow type="math_number" id="WnB0B*zuzGhv22$e=^#W">
                                                                              <field name="NUM">1</field>
                                                                            </shadow>
                                                                            <block type="variables_get" id="-w[K/yG%TIE=6zY!x#SO">
                                                                              <field name="VAR" id="V=[CbG9$B2^z*A$.tROA">SoC100</field>
                                                                            </block>
                                                                          </value>
                                                                          <value name="B">
                                                                            <shadow type="math_number" id="#v*9o+b0/,nY9gaK[{7E">
                                                                              <field name="NUM">1</field>
                                                                            </shadow>
                                                                            <block type="variables_get" id="RA`ObDz.^HC*z@|8bsZn">
                                                                              <field name="VAR" id="y;5+d8!WE-yi(I534HSb">EAutoKapa</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </value>
                                                                      <next>
                                                                        <block type="variables_set" id=",@4+%1i`waWli@hVRc1I">
                                                                          <field name="VAR" id="u,9.sks(Ks9Y9sJnRH{K">ReichweiteEAuto</field>
                                                                          <value name="VALUE">
                                                                            <block type="math_arithmetic" id="sMGPd$V]RC8QfZRpq`8B">
                                                                              <field name="OP">MULTIPLY</field>
                                                                              <value name="A">
                                                                                <shadow type="math_number" id="meclpTGxn`++sTXL/E}K">
                                                                                  <field name="NUM">1</field>
                                                                                </shadow>
                                                                                <block type="variables_get" id="NS,4gfv4[[Hd-k)Vre)=">
                                                                                  <field name="VAR" id="u,9.sks(Ks9Y9sJnRH{K">ReichweiteEAuto</field>
                                                                                </block>
                                                                              </value>
                                                                              <value name="B">
                                                                                <shadow type="math_number" id="JR5}/|[q#h#vR=:Ov0vw">
                                                                                  <field name="NUM">100</field>
                                                                                </shadow>
                                                                              </value>
                                                                            </block>
                                                                          </value>
                                                                          <next>
                                                                            <block type="variables_set" id="q^7n-IHfK6Rs-UCWMzG?">
                                                                              <field name="VAR" id="u,9.sks(Ks9Y9sJnRH{K">ReichweiteEAuto</field>
                                                                              <value name="VALUE">
                                                                                <block type="math_arithmetic" id="OdBU?vK`W2F+L(cgNb~c">
                                                                                  <field name="OP">DIVIDE</field>
                                                                                  <value name="A">
                                                                                    <shadow type="math_number">
                                                                                      <field name="NUM">1</field>
                                                                                    </shadow>
                                                                                    <block type="variables_get" id="ql1TbS/H#E569!@eF13Z">
                                                                                      <field name="VAR" id="u,9.sks(Ks9Y9sJnRH{K">ReichweiteEAuto</field>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="B">
                                                                                    <shadow type="math_number" id="I3@g$Q$,^Ig?Zs_[PQVd">
                                                                                      <field name="NUM">22</field>
                                                                                    </shadow>
                                                                                  </value>
                                                                                </block>
                                                                              </value>
                                                                              <next>
                                                                                <block type="update" id="2js+sd$f_=`x/$#Q0*(H">
                                                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                  <field name="OID">0_userdata.0.EigeneDatenpunkte.openWB.BerechneteReichweiteKM</field>
                                                                                  <field name="WITH_DELAY">FALSE</field>
                                                                                  <value name="VALUE">
                                                                                    <block type="math_rndfixed" id="=9u_:MFzh:zyD,AN_w1$">
                                                                                      <field name="n">1</field>
                                                                                      <value name="x">
                                                                                        <shadow type="math_number" id="facB80Oah;|MPLT~1)JS">
                                                                                          <field name="NUM">3.1234</field>
                                                                                        </shadow>
                                                                                        <block type="variables_get" id="T:mT/8iR]=VnocUd:u(y">
                                                                                          <field name="VAR" id="u,9.sks(Ks9Y9sJnRH{K">ReichweiteEAuto</field>
                                                                                        </block>
                                                                                      </value>
                                                                                    </block>
                                                                                  </value>
                                                                                  <next>
                                                                                    <block type="controls_if" id="jO7t(]#_dZSez2fXJxJV">
                                                                                      <mutation elseif="6"></mutation>
                                                                                      <value name="IF0">
                                                                                        <block type="logic_operation" id="M:X),rxv%_$dmZ=[2V~R">
                                                                                          <field name="OP">AND</field>
                                                                                          <value name="A">
                                                                                            <block type="logic_compare" id="nJU+b:WDBO(R*9`xioJy">
                                                                                              <field name="OP">GTE</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="=9lI;M$+TA~A~=2/P!8g">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="d8SD.p=7_any@rsR$+*c">
                                                                                                  <field name="NUM">0</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                          <value name="B">
                                                                                            <block type="logic_compare" id="6W7j`9^iX]4AB,d5[$L7">
                                                                                              <field name="OP">LTE</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="U?X:z|~jNt3J*_GJxqXq">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="/q4Dq/TQh{`2jdF!Pq_F">
                                                                                                  <field name="NUM">5</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </value>
                                                                                      <statement name="DO0">
                                                                                        <block type="update" id="wQ(!G]]KpWA4l?ThF57Q">
                                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                          <field name="OID">0_userdata.0.EigeneDatenpunkte.openWB.BatteryLevelIcon</field>
                                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                                          <value name="VALUE">
                                                                                            <block type="text" id="X^sl_u?KGZ.Q!tVn[W{T">
                                                                                              <field name="TEXT">/icons-addictive-flavour-png/battery/battery_empty.png</field>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </statement>
                                                                                      <value name="IF1">
                                                                                        <block type="logic_operation" id="Iwaaw#R,na9`^HURWt$f">
                                                                                          <field name="OP">AND</field>
                                                                                          <value name="A">
                                                                                            <block type="logic_compare" id=",%JYPcB]/hgE,RfqmI{y">
                                                                                              <field name="OP">GT</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="E{/9F_ky66DrK#,E!rt:">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id=".^MG`*DXcOs!c2GR7FsD">
                                                                                                  <field name="NUM">5</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                          <value name="B">
                                                                                            <block type="logic_compare" id="2zyqLF0q5GYMmmH++aoW">
                                                                                              <field name="OP">LT</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="[dBvQo[Gtaf{Knd}.DK~">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="=NQ=Lmb@(K{!pb}2)X{}">
                                                                                                  <field name="NUM">10</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </value>
                                                                                      <statement name="DO1">
                                                                                        <block type="update" id="k]`-B~z.Lzy|obj6~Nk|">
                                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                          <field name="OID">0_userdata.0.EigeneDatenpunkte.openWB.BatteryLevelIcon</field>
                                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                                          <value name="VALUE">
                                                                                            <block type="text" id="DW!5^3)A#jI#OGUH3vY9">
                                                                                              <field name="TEXT">/icons-addictive-flavour-png/battery/battery_10percent.png</field>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </statement>
                                                                                      <value name="IF2">
                                                                                        <block type="logic_operation" id="J|^qVVO=_}.qYn~Xg6]o">
                                                                                          <field name="OP">AND</field>
                                                                                          <value name="A">
                                                                                            <block type="logic_compare" id="61_##GFRO{U9ju|4w$w:">
                                                                                              <field name="OP">GTE</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="6B#Gxv:/^ley@37)-[EL">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id=")uO742hDGF2(gN^:|TFO">
                                                                                                  <field name="NUM">10</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                          <value name="B">
                                                                                            <block type="logic_compare" id="G|YoK?ao{#4%JC7w}e#F">
                                                                                              <field name="OP">LTE</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="mD)j8Z;fxj$bqV(KkHYt">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="pu_fK;DF[|l!Y_^Z%,18">
                                                                                                  <field name="NUM">20</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </value>
                                                                                      <statement name="DO2">
                                                                                        <block type="update" id="dY^xeibnz/VEZ-#y`3Tp">
                                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                          <field name="OID">0_userdata.0.EigeneDatenpunkte.openWB.BatteryLevelIcon</field>
                                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                                          <value name="VALUE">
                                                                                            <block type="text" id="3ksn2#l*YAgEl;}C+)7Y">
                                                                                              <field name="TEXT">/icons-addictive-flavour-png/battery/battery_20percent.png</field>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </statement>
                                                                                      <value name="IF3">
                                                                                        <block type="logic_operation" id="0d};2Q(1;Zlua14vLvpO">
                                                                                          <field name="OP">AND</field>
                                                                                          <value name="A">
                                                                                            <block type="logic_compare" id="5hP=p6}9F-2*X/+7;*l1">
                                                                                              <field name="OP">GT</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="pPCxrD=mSAwQQ#UD[II?">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="KJ5tcE[,3[AIfT01!)~,">
                                                                                                  <field name="NUM">20</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                          <value name="B">
                                                                                            <block type="logic_compare" id="*:s6.r^D=yAG]|E1RaI.">
                                                                                              <field name="OP">LTE</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="v9E%)sl/%cKyo~n}[}+1">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="z45Zi2}+SSiLmSW~{egR">
                                                                                                  <field name="NUM">40</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </value>
                                                                                      <statement name="DO3">
                                                                                        <block type="update" id="WZ|1TnEu:wMwWsuQIGIW">
                                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                          <field name="OID">0_userdata.0.EigeneDatenpunkte.openWB.BatteryLevelIcon</field>
                                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                                          <value name="VALUE">
                                                                                            <block type="text" id=".)yYUC{,MKsY~mV3vBAf">
                                                                                              <field name="TEXT">/icons-addictive-flavour-png/battery/battery_40percent.png</field>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </statement>
                                                                                      <value name="IF4">
                                                                                        <block type="logic_operation" id="MDQ3Aig:]8lzIPV@8dq^">
                                                                                          <field name="OP">AND</field>
                                                                                          <value name="A">
                                                                                            <block type="logic_compare" id="+8;_4Q^:.3b.y8C@1cK6">
                                                                                              <field name="OP">GT</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="x]h@,tV@!h9}:OTO{`7I">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="ZQC=wGl.sMr#2Abr_mD,">
                                                                                                  <field name="NUM">40</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                          <value name="B">
                                                                                            <block type="logic_compare" id="}u$BLEiAa!b$l-`Oo_vl">
                                                                                              <field name="OP">LTE</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="^3lk~]PSy2^*`cv,1c|)">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="69,Z811[Ha`w%h$m)b#r">
                                                                                                  <field name="NUM">60</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </value>
                                                                                      <statement name="DO4">
                                                                                        <block type="update" id="w+xfr)zLH%Grm(_z-9@;">
                                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                          <field name="OID">0_userdata.0.EigeneDatenpunkte.openWB.BatteryLevelIcon</field>
                                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                                          <value name="VALUE">
                                                                                            <block type="text" id="f.oSdj+MR/*hZaSP=?7?">
                                                                                              <field name="TEXT">/icons-addictive-flavour-png/battery/battery_60percent.png</field>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </statement>
                                                                                      <value name="IF5">
                                                                                        <block type="logic_operation" id="/Pu]Z{Mv/fuN{,F^GMfM">
                                                                                          <field name="OP">AND</field>
                                                                                          <value name="A">
                                                                                            <block type="logic_compare" id="SBktxv%9Mn:`)18%JBEm">
                                                                                              <field name="OP">GT</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="Y=i^kQjy2jhm/EM}`6%,">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="JI/aN)W`RG)o)OuD:IPQ">
                                                                                                  <field name="NUM">60</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                          <value name="B">
                                                                                            <block type="logic_compare" id=")a}DAAkpO!o$_oUhInCg">
                                                                                              <field name="OP">LTE</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="k2%4O7%gCKOSbJ#KJ~(d">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="12UYI3NE)|fmjyK2FJw9">
                                                                                                  <field name="NUM">80</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </value>
                                                                                      <statement name="DO5">
                                                                                        <block type="update" id="J;uJsyT+`U^pjA{*3bp^">
                                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                          <field name="OID">0_userdata.0.EigeneDatenpunkte.openWB.BatteryLevelIcon</field>
                                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                                          <value name="VALUE">
                                                                                            <block type="text" id="L4I^.^M^+50,At+g5?W[">
                                                                                              <field name="TEXT">/icons-addictive-flavour-png/battery/battery_80percent.png</field>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </statement>
                                                                                      <value name="IF6">
                                                                                        <block type="logic_operation" id=",8i1muAA#GpCaKp*j{[Q">
                                                                                          <field name="OP">AND</field>
                                                                                          <value name="A">
                                                                                            <block type="logic_compare" id="8@9$G?V6!YQ%!HD)cL#5">
                                                                                              <field name="OP">GT</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="D6{1:I-%PkV$n|]h8gfQ">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="YS?5+aTR7/_XtC@;jZ|L">
                                                                                                  <field name="NUM">80</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                          <value name="B">
                                                                                            <block type="logic_compare" id="ZlzVcOMJ7xUFf?8;6Rf1">
                                                                                              <field name="OP">LTE</field>
                                                                                              <value name="A">
                                                                                                <block type="variables_get" id="-;O#h/FS$vXAL)DPi.hy">
                                                                                                  <field name="VAR" id="-5qE{53gUXm~XDoCvrx4">SoC</field>
                                                                                                </block>
                                                                                              </value>
                                                                                              <value name="B">
                                                                                                <block type="math_number" id="ta%a5%8K~H2Q/82a^Qw2">
                                                                                                  <field name="NUM">100</field>
                                                                                                </block>
                                                                                              </value>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </value>
                                                                                      <statement name="DO6">
                                                                                        <block type="update" id="T6lw%}fnhF-:sWZf9Nl*">
                                                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                          <field name="OID">0_userdata.0.EigeneDatenpunkte.openWB.BatteryLevelIcon</field>
                                                                                          <field name="WITH_DELAY">FALSE</field>
                                                                                          <value name="VALUE">
                                                                                            <block type="text" id="nfIS5|o1+En@;^cFg^FN">
                                                                                              <field name="TEXT">/icons-addictive-flavour-png/battery/battery_full.png</field>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </statement>
                                                                                    </block>
                                                                                  </next>
                                                                                </block>
                                                                              </next>
                                                                            </block>
                                                                          </next>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </statement>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </xml>
                                          
                                          

                                          Ich finde es da über Blockly etwas übersichtlicher und einfacher anpassbar. Berechnung der Reichweite des E-Autos bitte raus löschen. Das Blockly erwartet eine Ladeanzeige als Zahl (in %).

                                          1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          497

                                          Online

                                          32.8k

                                          Users

                                          82.7k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Home
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe