Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. Farbe je druck ändern

    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

    Farbe je druck ändern

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

      @lucky51179

      falls du mit einem ext. editdor arbeitest wie z.b. word - nutze notepad++

      gibt's zum downloaden

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

        @liv-in-sky said in Farbe je druck ändern:

        {val:javascript.0.LOGO.Temperaturen.druck_pumpe; val<=0.6 ? "#ffffff" : val<=1.1 ? "#00ff00" : val<=1.4 ? "#ff6633" : val<=3 ? "#ff0000" : "#ffffff"}

        Jetzt läuft es musste nur aus den 0.6 - 0,6 machen habs mal getestet soweit Top, Danke

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

          @lucky51179

          0,6 (komma) ist ein zeichenkette
          0.6 ist eine zahl

          • mit komma sollte das eigentlich nicht funktionieren

          ist den dein datenpunkt eine zahl oder eine zeichenkette

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

            @liv-in-sky Stimmt sobald ich das Komma mache ist Farbe rot. Hab die punkte wieder rein sobald nun ist es weis. muss jetzt mal testen wenn der Pumpendruck höher ist wie sich die Farbe ändert.

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

              @lucky51179

              mach dir einen testdp vom typ zahl und teste es damit - den testdp kannst du "von hand" ändern

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

                @liv-in-skyHabe jetzt die werte mal geändert um es zu testen die Schrift bleibt auch bei 0,3 bar weiss

                {val:javascript.0.LOGO.Temperaturen.druck_pumpe; val<=0.1 ? "#ffffff" : val<=0.3 ? "#00ff00" : val<=0.5 ? "#ff6633" : val<=3 ? "#ff0000" : "#ffffff"}
                
                liv-in-sky 1 Reply Last reply Reply Quote 0
                • liv-in-sky
                  liv-in-sky @lucky51179 last edited by liv-in-sky

                  @lucky51179 sagte in Farbe je druck ändern:

                  {val:javascript.0.LOGO.Temperaturen.druck_pumpe; val<=0.1 ? "#ffffff" : val<=0.3 ? "#00ff00" : val<=0.5 ? "#ff6633" : val<=3 ? "#ff0000" : "#ffffff"}

                  {val:controll-own.0.AAATEST.TestZahl2; val<=0.1 ? "#ffffff" : val<=0.3 ? "#00ff00" : val<=0.5 ?  "#ff6633" : val<=3 ? "#ff0000" : "#ffffff"}
                  

                  das funktioniert bei mir - zeig mir mal deinen datenpunkt (state) - ist der eine zahl mit punkt

                  deine rot-töne sind schwer zu unterscheiden !!!

                  AApossis (69).gif

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

                    @liv-in-sky Habe jetzt das Script umgeschrieben damit es extra ein Punkt ist. kann es evtl am Anhang "bar" sein ?

                    Bildschirmfoto 2021-05-17 um 17.59.19.png

                    hab jetzt das "bar" weg gemacht jetzt klappt es

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

                      @lucky51179

                      ja - das kann sein - bar ist ein string - kann man nicht mit zahl vergleichen - du solltest die "bar" in die einheit des objectes schreiben

                      wenn das nicht geht müßte man schauen, ob man das ganze auch verwandeln kann. also das bar abschneiden und die 0.6 in eine number verwandeln

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

                        @lucky51179 nochmal nachgefragt - dieser dp ist eine zeichenkette - sonst könnte das bar nicht drinstehen - oder steht es schon unter einheit

                        Image 2.png

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

                          @liv-in-sky Hab das "bar" vom Script raus sowie das "," habe ich in einen "." geändert somit klappt es komplett

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

                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          964
                          Online

                          31.9k
                          Users

                          80.2k
                          Topics

                          1.3m
                          Posts

                          4
                          19
                          660
                          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