Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. (Gelöst) Absoluten Wert eines Objekts anzeigen

    NEWS

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    • Wir empfehlen: Node.js 22.x

    (Gelöst) Absoluten Wert eines Objekts anzeigen

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

      @amg_666

      mal ne andere frage - warum machst du das - ein minus-wert wird doch als minus angezeigt - bei einem normalen binding ?

      {mqtt.0.iot.smartmeter.sensor.1.obis.1-0:16.7.0.255.value}
      

      müßte doch reichen

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

        @liv-in-sky Nee, wie oben geschrieben, ich hab diesen +/- thread genommen um zu schauen ob das überhaupt funktioniert (tut es nicht), was ich wirklich will ist "nur" den absoluten Wert darstellen, also z.B. 446 wenn es **-**446 sind.
        Was ich also will ist Math.abs(xyz) als binding und das funktioniert jetzt bei mir nur mit Alias, nicht mit direktem DP

        liv-in-sky 2 Replies Last reply Reply Quote 0
        • liv-in-sky
          liv-in-sky @amg_666 last edited by

          @amg_666 nochmal : vis1 oder vis2

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

            @amg_666

            {wert1:0_userdata.0.CONTROL-OWN.AAATEST.TestStart; Math.abs(wert1)  }
            

            vis1: bei mir geht das ohne probleme

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

              @liv-in-sky vis1

              liv-in-sky 2 Replies Last reply Reply Quote 0
              • liv-in-sky
                liv-in-sky @amg_666 last edited by liv-in-sky

                @amg_666

                was sagt den die entwicklungsumgebung von chrome, wenn du die seite refresht ?

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

                  @amg_666

                  falsche antwort

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

                    @liv-in-sky ich wll ja eigentlich "nur"

                    {wert:mqtt.0.iot.smartmeter.sensor.1.obis.1-0:16.7.0.255.value;Math.abs(wert)} 
                    

                    also ohne irgendwelche String Additionen, das funktioniert schon nicht.
                    Ich weiss nicht was genau aus Chrome ich hier posten soll, der html Quelltext liefert schon das "NaN":
                    2b2e0240-d364-4d74-8ae9-80ef820d50cd-grafik.png

                    Ich nutze auch eigentlich Firefox, habs jetzt in Chrome geladen, selbes Ergebnis (math.abs mit direktem Datenpunkt geht nicht, Math.abs mit Alias-Datenpunkt geht

                    liv-in-sky jogibear9988 2 Replies Last reply Reply Quote 0
                    • liv-in-sky
                      liv-in-sky @amg_666 last edited by

                      @amg_666

                      du musst in den console tab gehen in den entwicklertools

                      Image 040.png

                      1 Reply Last reply Reply Quote 0
                      • jogibear9988
                        jogibear9988 @amg_666 last edited by

                        @amg_666 said in Absoluten Wert eines Objekts anzeigen:

                        {wert:mqtt.0.iot.smartmeter.sensor.1.obis.1-0:16.7.0.255.value;Math.abs(wert)}

                        was steht da wenn du es so machst (oder geht das bei vis überhaupt??)

                         {wert:mqtt.0.iot.smartmeter.sensor.1.obis.1-0:16.7.0.255.value;wert}
                        1 Reply Last reply Reply Quote 0
                        • liv-in-sky
                          liv-in-sky last edited by liv-in-sky

                          also:

                          nochmal getestet - das funktioniert bei mir damit:

                          {wert11:0_userdata.0.CONTROL-OWN.AAATEST.TestStart; wert11 > 0 ? '+'+ String(Math.abs(wert11)) : '-' + String(Math.abs(wert11))}
                          

                          smiler12.gif

                          mit dem alias geht das wahrscheinlich nur - weil du keine doppelpunkte in der object id haben darfst - ist ein fehler auf github und wurde nie repariert

                          da ist der fehler drin vor 0:16

                          .1.obis.1-0:16.7.
                          
                          amg_666 1 Reply Last reply Reply Quote 2
                          • amg_666
                            amg_666 @liv-in-sky last edited by

                            @liv-in-sky sagte in Absoluten Wert eines Objekts anzeigen:

                            weil du keine doppelpunkte in der object id haben darfst

                            Dann ist das die Antwort, die ich gesucht habe (die ich aber nicht hören will 🙂 )
                            Die mqtt Datenpunkte kommen von einem Lesekopf für meinen Smartmeter, da kann ich am Namen nichts anpassen, also muss ich wohl mit dem Alias leben.

                            Danke an alle

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

                            Support us

                            ioBroker
                            Community Adapters
                            Donate

                            463
                            Online

                            32.1k
                            Users

                            80.7k
                            Topics

                            1.3m
                            Posts

                            5
                            25
                            880
                            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