thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.08k stars 168 forks source link

Sensor card line_color property does not work #215

Closed henrikmaa closed 2 years ago

henrikmaa commented 2 years ago

My Home Assistant version: 2022.7.7

My lovelace configuration method (GUI or yaml): yaml

What I am doing:

trying to change color of the homekit infused sensor card with line_color property

What I expected to happen: image

the sensor card graph to change color

What happened instead: image

nothing

Minimal steps to reproduce:

# The least amount of code possible to reproduce my error
sensor:
        - title: hide
          columns: 2
          entities:
            - entity: sensor.lumi_lumi_weather_temperature
              name: Temperatur
              line_color: "#ffea00"
# End of code

also tried to change it using card_mod which did not work either

sensor:
        - title: hide
          columns: 2
          entities:
            - entity: sensor.lumi_lumi_weather_temperature
              name: Temperatur
              card_mod:
                style: |
                  ha-card {
                    --accent-color: #ffea00;
                  }
            - entity: sensor.lumi_lumi_weather_humidity
              name: Luft fuktighet
              card_mod:
                style: |
                  :host {
                    --accent-color: #ffea00;
                  }

Error messages from the browser console: CARD-MOD 3.1.5 IS INSTALLED layout-card.js:228 LAYOUT-CARD 2.4.2 IS INSTALLED state-switch.js:139 STATE-SWITCH 1.9.5 IS INSTALLED button-card.js?hacstag=146194325342:425 BUTTON-CARD Version 3.4.2 mini-graph-card-bundle.js?hacstag=1512800620110:1 MINI-GRAPH-CARD 0.11.0 auto-entities.js?hacstag=1677445841110:172 AUTO-ENTITIES 1.11.0 IS INSTALLED my-cards.js?hacstag=399108901100:186 ---- MY-SLIDER ---- Versjon 3.0.02
my-cards.js?hacstag=399108901100:356 ---- MY-SLIDER-V2 ---- Versjon 3.0.02
my-cards.js?hacstag=399108901100:356 HELLO FROM SLIDER-V2 my-cards.js?hacstag=399108901100:375 ---- MY-BUTTON ---- Versjon 1.0.0
my-cards.js?hacstag=399108901100:436 ---- MY-CARDS ---- Versjon 2.0.0
card-tools.js?hacstag=16140332811:90 CARD-TOOLS 2.1.2 IS INSTALLED DeviceID: cb64cda3-0349b1e1 swipe-card.js?hacstag=192732887400:21 SWIPE-CARD Version 4.0.0 config-template-card.js?hacstag=172177543136:329 The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'. See https://lit.dev/msg/deprecated-import-path for more information. (anonymous) @ config-template-card.js?hacstag=172177543136:329 config-template-card.js?hacstag=172177543136:735 CONFIG-TEMPLATE-CARD Version 1.3.6
fold-entity-row.js?hacstag=150781994220:78 FOLD-ENTITY-ROW 2.2.0 IS INSTALLED home:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "text-input-row" has already been used with this registry home:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "mmp-checkbox" has already been used with this registry home:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "simple-weather-card" has already been used with this registry light-entity-card.js:6868 LIGHT-ENTITY-CARD Version 5.0.0
home:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "auto-entities-editor" has already been used with this registry mini-graph-card-bundle.js:1 MINI-GRAPH-CARD 0.11.0 home:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "mini-graph-card" has already been used with this registry home:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "atomic-calendar-revive-editor" has already been used with this registry my-cards.js:186 ---- MY-SLIDER ---- Versjon 3.0.02
home:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "my-slider" has already been used with this registry home:1 Uncaught (in promise) DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "search-card" has already been used with this registry more-info-card.js?hacstag=1805289500994:36 MORE-INFO-CARD 1.2.0 IS INSTALLED home:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "more-info-card-editor" has already been used with this registry home:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "light-entity-card-editor" has already been used with this registry /hacsfiles/local/custom-lovelace/swipe-card/swipe-card.js:1 Failed to load resource: the server responded with a status of 404 () /hacsfiles/local/button-card.js:1 Failed to load resource: the server responded with a status of 404 () /hacsfiles/local/config-template-card.js:1 Failed to load resource: the server responded with a status of 404 () /community_plugin/cover-popup-card/cover-popup-card.js:1 Failed to load resource: the server responded with a status of 404 () mwc-list-item-base.ts:224 Uncaught (in promise) https://xxxxxx/hacsfiles/local/custom-lovelace/swipe-card/swipe-card.js mwc-list-item-base.ts:224 Uncaught (in promise) https://xxxxxx/hacsfiles/local/button-card.js mwc-list-item-base.ts:224 Uncaught (in promise) https://xxxxxx/hacsfiles/local/config-template-card.js mwc-list-item-base.ts:224 Uncaught (in promise) https://xxxxxx/community_plugin/cover-popup-card/cover-popup-card.js browser_mod.js:145 BROWSER_MOD 1.5.3 IS INSTALLED

By putting an X in the boxes ([]) below, I indicate that I: