Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. (Lovelace) Farbe der Icons verändern

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    (Lovelace) Farbe der Icons verändern

    This topic has been deleted. Only users with topic management privileges can see it.
    • CrunkFX
      CrunkFX Forum Testing @johannes1702 last edited by

      @johannes1702 Schau dir das mal als alternative an. Das nutze ich auch und bietet viel mehr Einstellungsmöglichkeiten, die gut Dokumentiert sind.
      https://github.com/custom-cards/button-card

      1 Reply Last reply Reply Quote 0
      • CrunkFX
        CrunkFX Forum Testing @johannes1702 last edited by

        @johannes1702 Kleines Beispiel für deinen Briefkasten cc6ca0fb-c23c-4df8-ad4d-07894c10d506-grafik.png

        type: 'custom:button-card'
        icon: 'mdi:cube'
        entity: sensor.Test
        color_type: card
        color: 'rgb(66, 134, 244)'
        name: Briefkasten
        state:
          - value: true
            color: 'rgb(0, 255, 0)'
          - value: false
            color: 'rgb(255, 0, 0)'
        
        
        1 Reply Last reply Reply Quote 1
        • J
          johannes1702 last edited by

          Wow, sehr interessant und Danke dir für das Beispiel.

          Frage: Wie bekomme ich button-card denn installiert? 😖

          CrunkFX 1 Reply Last reply Reply Quote 0
          • CrunkFX
            CrunkFX Forum Testing @johannes1702 last edited by CrunkFX

            @johannes1702 Das hier downloaden http://www.github.com/custom-cards/button-card/releases/latest/download/button-card.js und dann in den Instanzeinstellungen hier reinziehen: 8.PNG

            Zuletzt noch im Raw Editor 9.PNG 10.PNG
            Die Abhängigkeit hinzufügen.

            resources:
              - type: module
                url: /cards/button-card.js
            

            EDIT
            Es gab mal beim reinziehen ein Problem mit Firefox. Falls es nicht klappt nimm kurz nen anderen Browser

            1 Reply Last reply Reply Quote 1
            • J
              johannes1702 last edited by

              Ok, das war einfach 🙂 Was zum Spielen 😄

              CrunkFX 1 Reply Last reply Reply Quote 0
              • CrunkFX
                CrunkFX Forum Testing @johannes1702 last edited by

                @johannes1702 Hihi, bei Fragen einfach stellen. 🤠

                J 1 Reply Last reply Reply Quote 1
                • J
                  johannes1702 @CrunkFX last edited by

                  @CrunkFX Die kommen 😄

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    johannes1702 @johannes1702 last edited by

                    @CrunkFX Ich hab es angedroht 🙂

                    Erstmal, tolle Erweiterung zu Lovelace, danke für den Tipp. Macht echt Spaß.

                    Habe mal das gebaut, sollen zum Schluss dann 2 Reihen mit ja 4 Symbolen/Buttons werden:

                    c70bdad9-1e39-4dcd-970d-ce60029e9d8e-grafik.png

                    type: vertical-stack
                    title: Sensoren
                    cards:
                      - type: horizontal-stack
                        cards:
                          - type: 'custom:button-card'
                            entity: binary_sensor.WZ_Terrassentuere_rechts
                            name: Terrassentüre
                            icon: 'mdi:door'
                            tap_action:
                              action: none
                            show_state: false
                            state:
                              - value: true
                                color: 'rgb(255, 215, 0)'
                              - value: false
                                color: 'rgb(0, 205, 0)'
                      - type: horizontal-stack
                        cards:
                          - type: 'custom:button-card'
                            entity: binary_sensor.Bewegungsmelder_SZ_Bewegung
                            name: Schlafzimmer
                            icon: 'mdi:motion-sensor'
                            tap_action:
                              action: none
                            show_state: false
                            state:
                              - value: true
                                color: 'rgb(255, 215, 0)'
                              - value: false
                                color: 'rgb(0, 205, 0)'
                    

                    Funktioniert soweit, bis darauf, dass das Icon nicht grün wird. Ist der Sensorwert true, wird es gelb. Bei false soll es grün werden, nicht blau. 😞

                    Und noch was: Wenn ich eine Zeile mit # auskommentiere, dann ist nach dem speichern und neu öffnen die Zeile weg. Kann man dem das Löschen abgewöhnen. Auskommentieren finde ich zum testen doch ganz nett. 🙂

                    Danke 🙂

                    LG Johannes

                    CrunkFX 1 Reply Last reply Reply Quote 0
                    • CrunkFX
                      CrunkFX Forum Testing @johannes1702 last edited by

                      @johannes1702 Mahlzeit, bist du sicher, dass true und false boolsche Werte sind? Wenn ja, ersetz Mal false durch null , das hat beim Tileboard auch funktioniert.

                      Probier das mit dem auskommentieren Mal im RAW Editor wo du Ressources hinzugefügt hast.

                      1 Reply Last reply Reply Quote 0
                      • J
                        johannes1702 last edited by

                        @CrunkFX

                        Guten Morgen,

                        habe mal null probiert, hat aber nichts verändert. Also in den Objekten ist es auf jeden Fall (noch) ein boolean Wert:

                        {
                          "type": "state",
                          "common": {
                            "name": "OpenClose 25 open",
                            "type": "boolean",
                            "role": "sensor.open",
                            "read": true,
                            "write": false,
                            "custom": {
                              "lovelace.0": {
                                "enabled": true,
                                "entity": "binary_sensor",
                                "name": "WZ_Terrassentuere_rechts"
                              }
                            }
                          },
                          "native": {},
                          "from": "system.adapter.deconz.0",
                          "user": "system.user.admin",
                          "ts": 1594748470204,
                          "_id": "deconz.0.Sensors.25.open",
                          "acl": {
                            "object": 1638,
                            "state": 1638
                          }
                        }
                        

                        Kann man irgendwie prüfen, was für ein Wert in Lovelace ankommt?

                        Grüße
                        Jo

                        CrunkFX 1 Reply Last reply Reply Quote -1
                        • CrunkFX
                          CrunkFX Forum Testing @johannes1702 last edited by

                          @johannes1702 Wenn das Objekt als bool konfiguriert ist, dann kommt auch bool in Lovelace an. Änder Mal den Datenpunkt von binary in Sensor.

                          J 1 Reply Last reply Reply Quote 0
                          • J
                            johannes1702 @CrunkFX last edited by

                            @CrunkFX Ja, das wars. Habe es in Sensor geändert und jetzt wirds grün 🙂

                            CrunkFX 1 Reply Last reply Reply Quote 0
                            • CrunkFX
                              CrunkFX Forum Testing @johannes1702 last edited by

                              @johannes1702 Perfekt

                              J 1 Reply Last reply Reply Quote 0
                              • J
                                johannes1702 @CrunkFX last edited by

                                @CrunkFX

                                Hatte den Bewegungssensor (Schlafzimmer) ja automatisch eingebunden. Scheinbar hakt es da etwas... Wenn ich ihn manuell einbinde, als sensor, dann geht der auch.

                                CrunkFX 1 Reply Last reply Reply Quote 0
                                • CrunkFX
                                  CrunkFX Forum Testing @johannes1702 last edited by

                                  @johannes1702 Ja ich binde die immer manuell und als Sensoren ein.

                                  J 1 Reply Last reply Reply Quote 0
                                  • J
                                    johannes1702 @CrunkFX last edited by

                                    @CrunkFX Hab ich jetzt auch gemacht. Bietet etwas mehr Kontrolle 🙂

                                    CrunkFX 1 Reply Last reply Reply Quote 0
                                    • CrunkFX
                                      CrunkFX Forum Testing @johannes1702 last edited by

                                      @johannes1702 Ja bei der Erweiterung funktioniert das wunderbar.

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

                                      Support us

                                      ioBroker
                                      Community Adapters
                                      Donate

                                      819
                                      Online

                                      32.0k
                                      Users

                                      80.4k
                                      Topics

                                      1.3m
                                      Posts

                                      vis
                                      2
                                      24
                                      2361
                                      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