Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. Material Design Widgets: Value Widget

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Material Design Widgets: Value Widget

    This topic has been deleted. Only users with topic management privileges can see it.
    • Scrounger
      Scrounger Developer @ub.privat last edited by

      @ub-privat
      : ? Ist falsch, Vergleich es mit meinem Beispiel

      ub.privat 1 Reply Last reply Reply Quote 0
      • ub.privat
        ub.privat @Scrounger last edited by

        @scrounger
        @sigi234

        ich könnte verzweifeln...

        Dein Beispiel:

        {a:idDatenpunkt; a === "Cooking.Oven.Program.HeatingMode.SlowCook" ? "Sanftgaren" : a === "Cooking.Oven.Program.HeatingMode.HotAir" ? "4D Heißluft" : "coolStart-Funktion"} 
        

        Meine angepasstes Binding:

        {a:homeconnect.0.SIEMENS-HS858GXB6-68A40E060A0C.status.BSH_Common_Status_OperationState; a === "BSH.Common.EnumType.OperationState.Inactive" ? "Inactive : a === "BSH.Common.EnumType.OperationState.Ready" ? "Ready" : a === "BSH.Common.EnumType.OperationState.Run" ? "Run" : a === "BSH.Common.EnumType.OperationState.Finished" ? "Finished" : a === "BSH.Common.EnumType.OperationState.Pause" ? "Pause"}
        

        Zwischen jedem Doppelpunkt steht die Ereignisabfrage und die "" beschreiben das anzuzeogende Ergebnis.
        Ich bin jeden Punkt, Doppelpunkt, Leerzeichen durchgegangen!
        Leider ohne Erfolg.

        baeb9a6d-0cd5-474a-aff2-c575d5336715-grafik.png

        Hier der DP:
        5910c3a1-6183-4f4f-92cc-c4f9afc5c397-grafik.png
        Somit müßte in der VIS 'Inactive' stehen, tut es aber nicht, stattdessen steht eine Null!?

        2eed322c-212b-4995-a9f3-5e9930913590-grafik.png

        Woher kommt die NULL und wonach muss ich noch schauen?

        Scrounger 1 Reply Last reply Reply Quote 0
        • Scrounger
          Scrounger Developer @ub.privat last edited by

          @ub-privat
          Hinter inactive fehlt "

          ub.privat 1 Reply Last reply Reply Quote 0
          • ub.privat
            ub.privat @Scrounger last edited by

            @scrounger

            Du hast recht, es fehlte das Ausführungszeichen "...

            {a:homeconnect.0.SIEMENS-HS858GXB6-68A40E060A0C.status.BSH_Common_Status_OperationState; a === "BSH.Common.EnumType.OperationState.Inactive" ? "Inactive" : a === "BSH.Common.EnumType.OperationState.Ready" ? "Ready" : a === "BSH.Common.EnumType.OperationState.Run" ? "Run" : a === "BSH.Common.EnumType.OperationState.Finished" ? "Finished" : a === "BSH.Common.EnumType.OperationState.Pause" ? "Pause"}
            

            es ändert aber nichts am Ergebnis!
            345802dd-c4d1-4b5e-8876-e152bdb05612-grafik.png

            So langsam gebe ich auf...

            Du hattest geschrieben: "😉 Mit dem value Widget geht das noch nicht, muss ich noch implementieren.", , dass du diese Art der Abfrage mit in das Widget einbauen möchtest. Dann werde ich wohl warten. Egal welches Widget ich verwende, dass Bindig ist ja entscheidend.

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

              @sigi234
              hi, habe es mal in einem html widget gemacht - da sieht es so aus - habe eure datenpunkte mal nachgebaut - sowas habe ich nicht

              datenpunkt raw:

              {
               "from": "system.adapter.admin.0",
               "user": "system.user.admin",
               "ts": 1616765507789,
               "common": {
                 "name": "wertelister_Sigi",
                 "role": "",
                 "type": "string",
                 "desc": "Manuell erzeugt",
                 "min": 0,
                 "max": 5,
                 "def": 0,
                 "read": true,
                 "write": true,
                 "states": {
                   "Cooking.Oven.Program.HeatingMode.SlowCook": "Sanftgaren",
                   "Cooking.Oven.Program.HeatingMode.HotAir": "4D Heißluft",
                   "Cooking.Oven.Program.HeatingMode.TopBottomHeating": "Ober-/ Unterhitze",
                   "Cooking.Oven.Program.HeatingMode.HotAirEco": "Heißluft eco",
                   "Cooking.Oven.Program.HeatingMode.TopBottomHeatingEco": "Ober-/ Unterhitze eco",
                   "Cooking.Oven.Program.HeatingMode.HotAirGrilling": "Umluftgrillen",
                   "Cooking.Oven.Program.HeatingMode.PizzaSetting": "Pizzastufe",
                   "Cooking.Oven.Program.HeatingMode.IntensiveHeat": "Intensivhitze",
                   "Cooking.Oven.Program.HeatingMode.BottomHeating": "Unterhitze",
                   "Cooking.Oven.Program.HeatingMode.Desiccation": "Dörren",
                   "Cooking.Oven.Program.HeatingMode.PreheatOvenware": "Geschirr vorwärmen",
                   "Cooking.Oven.Program.HeatingMode.KeepWarm": "Warmhalten",
                   "Cooking.Oven.Program.HeatingMode.FrozenHeatupSpecial": "coolStart-Funktion"
                 }
               },
               "native": {},
               "acl": {
                 "object": 1636,
                 "owner": "system.user.admin",
                 "ownerGroup": "system.group.administrator",
                 "state": 1636
               },
               "_id": "controll-own.0.AAATEST.wertelister_Sigi",
               "type": "state"
              }
              

              FORMEL in html widget:

              {val:controll-own.0.AAATEST.wertelister_Sigi; val== "Cooking.Oven.Program.HeatingMode.SlowCook" ? "SlowCook" : val=="Cooking.Oven.Program.HeatingMode.HotAir" ? "HotAir" : val=="Cooking.Oven.Program.HeatingMode.TopBottomHeating" ? "TopBottomHeating" : val=="Cooking.Oven.Program.HeatingMode.HotAirEco" ? "HotAirEco" : val == "Cooking.Oven.Program.HeatingMode.HotAirGrilling" ? "HotAirGrilling" : "no-no" } 
              

              vis:

              AApossis (31).gif

              checke nur dieersten einträge- wenn dann einer nicht dabei ist, wird no-no angezeigt - dass muss am ende auch stehen, sonst ist die formel nicht vollständig - auch wenn alle einträge abgefragt werden

              ein value widget finde ich nicht - wie heißt das genau - ist doch im material design widget - finde ich nicht

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

                @sigi234

                mittlerweile habe ich das value widget

                da geht es auch

                AApossis (32).gif

                selbe formel - selber datenpunkt

                Image 1.png

                sigi234 1 Reply Last reply Reply Quote 0
                • sigi234
                  sigi234 Forum Testing Most Active @liv-in-sky last edited by

                  @liv-in-sky

                  Geht nicht, mein Original RAW:

                  {
                    "from": "system.adapter.homeconnect.0",
                    "user": "system.user.admin",
                    "ts": 1616770922094,
                    "common": {
                      "name": "Betriebsstatus",
                      "type": "mixed",
                      "role": "indicator",
                      "unit": "",
                      "write": true,
                      "read": true,
                      "states": {
                        "BSH.Common.EnumType.OperationState.Inactive": "Inactive",
                        "BSH.Common.EnumType.OperationState.Ready": "Ready",
                        "BSH.Common.EnumType.OperationState.Run": "Run",
                        "BSH.Common.EnumType.OperationState.Finished": "Finished"
                      }
                    },
                    "native": {},
                    "acl": {
                      "object": 1636,
                      "owner": "system.user.admin",
                      "ownerGroup": "system.group.administrator",
                      "state": 1636
                    },
                    "_id": "homeconnect.0.401010522278007458.status.BSH_Common_Status_OperationState",
                    "ty
                  
                  liv-in-sky 1 Reply Last reply Reply Quote 0
                  • liv-in-sky
                    liv-in-sky @sigi234 last edited by

                    @sigi234 zeig mal die formel

                    sigi234 1 Reply Last reply Reply Quote 0
                    • sigi234
                      sigi234 Forum Testing Most Active @liv-in-sky last edited by sigi234

                      @liv-in-sky sagte in Material Design Widgets: Value Widget:

                      @sigi234 zeig mal die formel

                      {a:homeconnect.0.401010522278007458.status.BSH_Common_Status_OperationState; a === "BSH.Common.EnumType.OperationState.Inactive" ? "aus" : a === "BSH.Common.EnumType.OperationState.Ready" ? "Ready" : a === "BSH.Common.EnumType.OperationState.Run" ? "Run" : a === "BSH.Common.EnumType.OperationState.Finished" ? "Finished"}
                      

                      Im Wert sind Klammern?

                      Screenshot (3521).png

                      liv-in-sky 2 Replies Last reply Reply Quote 0
                      • Scrounger
                        Scrounger Developer @ub.privat last edited by Scrounger

                        @ub-privat, @sigi234
                        Das Binding ist auch nicht korrekt, so auf die schnelle am Ende fehlt noch Else Bedienung also : xxx

                        Schau dir das bei @liv-in-sky an da ist es korrekt.
                        Grundsätzlich kann ich dir empfehlen Bau das Mal Schritt für Schritt auf, also erste Bedienung, testen, dann zweite Bedienung rein, testen usw

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

                          @sigi234

                          teste mal:

                          {val:homeconnect.0.401010522278007458.status.BSH_Common_Status_OperationState; val== "BSH.Common.EnumType.OperationState.Inactive" ? "aus" : val=="BSH.Common.EnumType.OperationState.Ready" ? "Ready" : val=="BSH.Common.EnumType.OperationState.Run" ? "Run" : val=="BSH.Common.EnumType.OperationState.Finished" ? "Finished" : "no-no" } 
                          
                          1 Reply Last reply Reply Quote 0
                          • liv-in-sky
                            liv-in-sky @sigi234 last edited by

                            @sigi234

                            sorry - diesmal hatte ich einen fehler drin

                            {val:homeconnect.0.401010522278007458.status.BSH_Common_Status_OperationState; val== "BSH.Common.EnumType.OperationState.Inactive" ? "aus" : val=="BSH.Common.EnumType.OperationState.Ready" ? "Ready" : val=="BSH.Common.EnumType.OperationState.Run" ? "Run" : val=="BSH.Common.EnumType.OperationState.Finished" ? "Finished" :  "no-no" } 
                            
                            sigi234 1 Reply Last reply Reply Quote 1
                            • sigi234
                              sigi234 Forum Testing Most Active @liv-in-sky last edited by sigi234

                              @liv-in-sky sagte in Material Design Widgets: Value Widget:

                              @sigi234

                              sorry - diesmal hatte ich einen fehler drin

                              Jupp, es kommt Run 👍

                              Ich sehe auf den 1.Blick keinen Unterschied

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

                                @sigi234 dann nutz den zweiten - === ist jetzt ==
                                und am ende fehlte : no-no - sonst ist die formel nicht richtig

                                sigi234 1 Reply Last reply Reply Quote 1
                                • sigi234
                                  sigi234 Forum Testing Most Active @liv-in-sky last edited by

                                  @liv-in-sky sagte in Material Design Widgets: Value Widget:

                                  @sigi234 dann nutz den zweiten - === ist jetzt ==
                                  und am ende fehlte : no-no - sonst ist die formel nicht richtig

                                  Um es zu verstehen, wie kommst du auf : no-no

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

                                    @sigi234 das no-no kann auch irgendwas andres sein -es geht darum , dass

                                    mmm ? "nnn" : "yyy"

                                    wenn mmm dann nnn sonst yyy

                                    wenn du nun immer wieder statt yyy eine weitere abfrage reingibst, fehlt am ende ein

                                    : yyy

                                    die formel ist dann nicht fertig - man nennt das auch einen defaultwert - wenn alles davor nicht paßt, wird yyy eingesetzt - ich habe einfach no-no genommen - da kann auch "" stehen,

                                    normalerweise bringt der adapter genaudie 4 werte - daher wirst du no-no nie sehen werden !

                                    ub.privat 2 Replies Last reply Reply Quote 2
                                    • ub.privat
                                      ub.privat @liv-in-sky last edited by

                                      @liv-in-sky
                                      @Scrounger
                                      @sigi234

                                      war ne schwere Geburt, aber nun funktioniert es! @liv-in-sky - tolle Erklärung, nun habe ich es vollends verstanden und in mein kleines Wiki verewigt!

                                      DANKE.

                                      1 Reply Last reply Reply Quote 1
                                      • ub.privat
                                        ub.privat @liv-in-sky last edited by ub.privat

                                        @liv-in-sky

                                        ich muss leider die Flagge wieder runter ziehen, zu früh gefreut.
                                        Mit dem Datenpunkt, so wie du ihn aufbereitet hast, funktioniert es bei 3 Geräten einwandfrei. Hier wird der Gerätezustand angezeigt, klappt perfekt.

                                        Nun wollte ich auf die identische Art und weise die aktiven Programme visualisieren.

                                        Der DP heist (RAW):

                                        {
                                          "type": "state",
                                          "common": {
                                            "name": "BSH_Common_Root_ActiveProgram",
                                            "type": "string",
                                            "role": "indicator",
                                            "write": true,
                                            "read": true,
                                            "states": {
                                              "Cooking.Oven.Program.HeatingMode.HotAirEco": "Heißluft eco",
                                              "Cooking.Oven.Program.HeatingMode.TopBottomHeatingEco": "Ober-/ Unterhitze eco",
                                              "Cooking.Oven.Program.HeatingMode.PizzaSetting": "Pizzastufe",
                                              "Cooking.Oven.Program.HeatingMode.IntensiveHeat": "Intensivhitze",
                                              "Cooking.Oven.Program.HeatingMode.SlowCook": "Sanftgaren",
                                              "Cooking.Oven.Program.HeatingMode.HotAir": "4D Heißluft",
                                              "Cooking.Oven.Program.HeatingMode.TopBottomHeating": "Ober-/ Unterhitze",
                                              "Cooking.Oven.Program.HeatingMode.HotAirGrilling": "Umluftgrillen",
                                              "Cooking.Oven.Program.HeatingMode.BottomHeating": "Unterhitze",
                                              "Cooking.Oven.Program.HeatingMode.Desiccation": "Dörren",
                                              "Cooking.Oven.Program.HeatingMode.PreheatOvenware": "Geschirr vorwärmen",
                                              "Cooking.Oven.Program.HeatingMode.FrozenHeatupSpecial": "coolStart-Funktion",
                                              "Cooking.Oven.Program.HeatingMode.KeepWarm": "Warmhalten"
                                            }
                                          },
                                          "native": {},
                                          "from": "system.adapter.homeconnect.0",
                                          "user": "system.user.admin",
                                          "ts": 1616709638385,
                                          "_id": "homeconnect.0.SIEMENS-CN878G4B6-68A40E0542E8.programs.active.BSH_Common_Root_ActiveProgram",
                                          "acl": {
                                            "object": 1636,
                                            "state": 1636,
                                            "owner": "system.user.admin",
                                            "ownerGroup": "system.group.administrator"
                                          }
                                        }
                                        

                                        Nun habe ich, das Widget wie folgt beschrieben:

                                        {val:homeconnect.0.SIEMENS-CN878G4B6-68A40E0542E8.programs.active.BSH_Common_Root_ActiveProgram; val== "Cooking.Oven.Program.HeatingMode.PizzaSetting": ? "Pizzastufe" : "no-no" }
                                        

                                        25157f5f-81e0-4f07-9d2b-e5dbc5931a91-grafik.png

                                        Nach Scrougers Ratschlag, erstmal einen Zustand zu testen und dan zu erweitern, war richtig und gut. Deshalb habe ich nur die Pizzstufe drin, kann es auch gerade testen, weil der Backofen an ist.
                                        Nur in der VISU kommt wieder eine NULL!

                                        8835b70c-3e8b-4423-98e1-5c3a14c34242-grafik.png
                                        Würdest bitte noch mal einen Blick auf das Binding werfen?

                                        liv-in-sky 1 Reply Last reply Reply Quote 0
                                        • liv-in-sky
                                          liv-in-sky @ub.privat last edited by liv-in-sky

                                          @ub-privat der ":" vor dem "?" nach pizzasetting gehört da nicht hin gehört

                                          du kannst in chrome die entwicklertools öffnen und auf console-tab siehst du sofort beim laden, ob du ein symantisches problem hast

                                          1 Reply Last reply Reply Quote 0
                                          • ub.privat
                                            ub.privat last edited by

                                            @liv-in-sky

                                            Der Hinweis mit GoogleChrome ist gar nicht so schlecht. Ein paar Fehler - SCHREIBFEHLER! - konnte ich bereits beseitigen. DANKE.

                                            Nun habe ich noch folgenden Fehler, dazu der ERROR-Text aus der Console:

                                            promisebuffer.ts:24 Error in eval[value]     : {val:homeconnect.0.SIEMENS-SX858D06PE-68A40E064ECA.programs.active.BSH_Common_Root_ActiveProgram; val== "Dishcare.Dishwasher.Program.Intensiv70" ? "Intensiv 70°C" : val== "Dishcare.Dishwasher.Program.Auto2" ? "Auto 45-65°C" : val== "Dishcare.Dishwasher.Program.Eco50" ? "Eco 50°C : val== "Dishcare.Dishwasher.Program.NightWash" ? "Leise" : val== "Dishcare.Dishwasher.Program.Quick65" ? "Schnell 65°C" : val== "Dishcare.Dishwasher.Program.Quick45" ? "Schnell 45°C" : val== "Dishcare.Dishwasher.Program.MachineCare" ? "Maschinenpflege" : "no-no" }
                                            (anonymous) @ promisebuffer.ts:24
                                            (anonymous) @ captureconsole.ts:16
                                            formatBinding @ vis.js:2498
                                            createIds @ vis.js:3312
                                            (anonymous) @ vis.js:3330
                                            sentryWrapped @ helpers.ts:124
                                            setTimeout (async)
                                            (anonymous) @ trycatch.ts:197
                                            createIds @ vis.js:3329
                                            (anonymous) @ vis.js:3461
                                            (anonymous) @ conn.js:801
                                            r.onack @ socket.io.js:8
                                            r.onpacket @ socket.io.js:8
                                            (anonymous) @ socket.io.js:8
                                            r.emit @ socket.io.js:6
                                            r.ondecoded @ socket.io.js:6
                                            (anonymous) @ socket.io.js:8
                                            r.emit @ socket.io.js:6
                                            a.add @ socket.io.js:6
                                            r.ondata @ socket.io.js:6
                                            (anonymous) @ socket.io.js:8
                                            r.emit @ socket.io.js:6
                                            r.onPacket @ socket.io.js:6
                                            (anonymous) @ socket.io.js:6
                                            r.emit @ socket.io.js:6
                                            r.onPacket @ socket.io.js:7
                                            r.onData @ socket.io.js:7
                                            ws.onmessage @ socket.io.js:8
                                            promisebuffer.ts:24 Error in eval[script]: var val = "undefined";return  val== "Dishcare.Dishwasher.Program.Intensiv70" ? "Intensiv 70°C" : val== "Dishcare.Dishwasher.Program.Auto2" ? "Auto 45-65°C" : val== "Dishcare.Dishwasher.Program.Eco50" ? "Eco 50°C : val== "Dishcare.Dishwasher.Program.NightWash" ? "Leise" : val== "Dishcare.Dishwasher.Program.Quick65" ? "Schnell 65°C" : val== "Dishcare.Dishwasher.Program.Quick45" ? "Schnell 45°C" : val== "Dishcare.Dishwasher.Program.MachineCare" ? "Maschinenpflege" : "no-no" ;
                                            (anonymous) @ promisebuffer.ts:24
                                            (anonymous) @ captureconsole.ts:16
                                            formatBinding @ vis.js:2499
                                            createIds @ vis.js:3312
                                            (anonymous) @ vis.js:3330
                                            sentryWrapped @ helpers.ts:124
                                            setTimeout (async)
                                            (anonymous) @ trycatch.ts:197
                                            createIds @ vis.js:3329
                                            (anonymous) @ vis.js:3461
                                            (anonymous) @ conn.js:801
                                            r.onack @ socket.io.js:8
                                            r.onpacket @ socket.io.js:8
                                            (anonymous) @ socket.io.js:8
                                            r.emit @ socket.io.js:6
                                            r.ondecoded @ socket.io.js:6
                                            (anonymous) @ socket.io.js:8
                                            r.emit @ socket.io.js:6
                                            a.add @ socket.io.js:6
                                            r.ondata @ socket.io.js:6
                                            (anonymous) @ socket.io.js:8
                                            r.emit @ socket.io.js:6
                                            r.onPacket @ socket.io.js:6
                                            (anonymous) @ socket.io.js:6
                                            r.emit @ socket.io.js:6
                                            r.onPacket @ socket.io.js:7
                                            r.onData @ socket.io.js:7
                                            ws.onmessage @ socket.io.js:8
                                            promisebuffer.ts:24 Error in eval[error] : SyntaxError: Unexpected identifier
                                            

                                            Das ist mein Binding:

                                            {val:homeconnect.0.SIEMENS-SX858D06PE-68A40E064ECA.programs.active.BSH_Common_Root_ActiveProgram; val== "Dishcare.Dishwasher.Program.Intensiv70" ? "Intensiv 70°C" : val== "Dishcare.Dishwasher.Program.Auto2" ? "Auto 45-65°C" : val== "Dishcare.Dishwasher.Program.Eco50" ? "Eco 50°C : val== "Dishcare.Dishwasher.Program.NightWash" ? "Leise" : val== "Dishcare.Dishwasher.Program.Quick65" ? "Schnell 65°C" : val== "Dishcare.Dishwasher.Program.Quick45" ? "Schnell 45°C" : val== "Dishcare.Dishwasher.Program.MachineCare" ? "Maschinenpflege" : "no-no" }
                                            

                                            Wie muss ich den Fehlertext lesen? Ist dies die Fehlerquelle: Error in eval[script]: var val = "undefined";return ?

                                            liv-in-sky 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            803
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            vis
                                            16
                                            76
                                            6849
                                            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