Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. HTML Widget Berechnung

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    HTML Widget Berechnung

    This topic has been deleted. Only users with topic management privileges can see it.
    • liv-in-sky
      liv-in-sky @Michi_1978 last edited by

      @michi_1978

      {....;"irgendeine summe" > 0 ? ((+sonoffhauscurrw)+(+sonoffheizungcurrw)).toFixed(2)+ ""} : 0}
      

      so in die richtung

      M 1 Reply Last reply Reply Quote 0
      • M
        Michi_1978 @liv-in-sky last edited by

        @liv-in-sky
        Danke für die schnelle Antwort.
        Leider weis ich anhand deines Beispiels nicht was da noch fehlt 😞
        Wärst du so nett und kannst den Code einmal vervollständigen 🙂

        liv-in-sky 1 Reply Last reply Reply Quote 0
        • liv-in-sky
          liv-in-sky @Michi_1978 last edited by

          @michi_1978

          zum einem.
          der anfang

          {sonoffhauscurrw:sonoff.0.DVES_9D1889.Haus_curr_w;sonoffheizungcurrw:sonoff.0.DVES_5C6832.Heizung_curr_w;"irgendeine summe" > 0 ? ((+sonoffhauscurrw)+(+sonoffheizungcurrw)).toFixed(2)+ ""} : 0}
          

          irgendeine summe: z.b : sonoffhauscurrw-sonoffheizungcurrw

          M 1 Reply Last reply Reply Quote 0
          • M
            Michi_1978 @liv-in-sky last edited by

            @liv-in-sky

            Da stimmt noch etwas nicht:

            {sonoffhauscurrw:sonoff.0.DVES_9D1889.Haus_curr_w;sonoffheizungcurrw:sonoff.0.DVES_5C6832.Heizung_curr_w;"sonoffhauscurrw+sonoffheizungcurrw" > 0 ? ((+sonoffhauscurrw)+(+sonoffheizungcurrw)).toFixed(2)+ ""} : 0}
            
            

            Das ist die ausgabe in VIS

            0 : 0 }
            
            liv-in-sky 3 Replies Last reply Reply Quote 0
            • liv-in-sky
              liv-in-sky @Michi_1978 last edited by

              @michi_1978

              {sonoffhauscurrw:sonoff.0.DVES_9D1889.Haus_curr_w;sonoffheizungcurrw:sonoff.0.DVES_5C6832.Heizung_curr_w;"sonoffhauscurrw+sonoffheizungcurrw" > 0 ? ((+sonoffhauscurrw)+(+sonoffheizungcurrw)).toFixed(2)+ "" : 0}
              

              da war eine geschweifte klammer zuviel

              1 Reply Last reply Reply Quote 0
              • liv-in-sky
                liv-in-sky @Michi_1978 last edited by liv-in-sky

                @michi_1978

                und die anführungszeichen müssen auch weg

                {sonoffhauscurrw:sonoff.0.DVES_9D1889.Haus_curr_w; sonoffheizungcurrw: sonoff.0.DVES_5C6832.Heizung_curr_w; sonoffhauscurrw+sonoffheizungcurrw > 0 ? ((+sonoffhauscurrw)+(+sonoffheizungcurrw)).toFixed(2) : 0}
                
                M 1 Reply Last reply Reply Quote 0
                • liv-in-sky
                  liv-in-sky @Michi_1978 last edited by

                  @michi_1978

                  zum testen

                  legst du dir am besten einen dp an und gibst den in der formel ein - dann kannst du da werte reinschreiben und nachsehen, ob alles richtig in der vis angezeigt wird

                  1 Reply Last reply Reply Quote 0
                  • M
                    Michi_1978 @liv-in-sky last edited by Michi_1978

                    @liv-in-sky said in HTML Widget Berechnung:

                    {sonoffhauscurrw:sonoff.0.DVES_9D1889.Haus_curr_w; sonoffheizungcurrw: sonoff.0.DVES_5C6832.Heizung_curr_w; sonoffhauscurrw+sonoffheizungcurrw > 0 ? ((+sonoffhauscurrw)+(+sonoffheizungcurrw)).toFixed(2) : 0}

                    So wieder zuhause von der Arbeit.

                    habe es das mal versucht, auch mit "<", da gerade nur negative werte rein kommen, das hat auch nicht funktioniert:

                    sonoffhauscurrw)+(sonoffheizungcurrw > 0
                    

                    durch habe ich es durch

                    ((+sonoffhauscurrw)+(sonoffheizungcurrw)) < 0
                    

                    abgeändert und das Funktioniert.

                    Hier nochmal der vollständige Code der jetzt Funktioniert:

                    {sonoffhauscurrw:sonoff.0.DVES_9D1889.Haus_curr_w; sonoffheizungcurrw:sonoff.0.DVES_5C6832.Heizung_curr_w; ((+sonoffhauscurrw)+(+sonoffheizungcurrw)) > 1 ? ((+sonoffhauscurrw)+(+sonoffheizungcurrw)) : 0}
                    

                    Besten Dank für deine Hilfe!

                    M 1 Reply Last reply Reply Quote 1
                    • M
                      Michi_1978 @Michi_1978 last edited by Michi_1978

                      Habs hinbekommen

                      liv-in-sky 1 Reply Last reply Reply Quote 0
                      • liv-in-sky
                        liv-in-sky @Michi_1978 last edited by

                        @michi_1978 dann lernt man am meisten 👍

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        492
                        Online

                        31.9k
                        Users

                        80.2k
                        Topics

                        1.3m
                        Posts

                        2
                        11
                        422
                        Loading More Posts
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes
                        Reply
                        • Reply as topic
                        Log in to reply
                        Community
                        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                        The ioBroker Community 2014-2023
                        logo