Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icon color wrong #303

Open
rbhun opened this issue Aug 14, 2024 · 1 comment
Open

icon color wrong #303

rbhun opened this issue Aug 14, 2024 · 1 comment

Comments

@rbhun
Copy link

rbhun commented Aug 14, 2024

this is not a huge issue, but I created this card for my RGBW lights, mostly to see the effects of some automations:

image

as you can see I have added state_color: true, but all the icons are red, becuase the total light is red.
This was working better when I was using each slider for each entity. This is a fibaro RGBW and it presents 6 lights, one for overall, and one each for r,g,b,w plus one as 'last light'. However, when doing that, I cannot use your attribute:red, because the red channel has no attribute. To get the current affect, I have to add the overall red 5 times, and use attributes to get red green blue white. This way, I get the nice colored slider.

So maybe a workaround is to offer the slider color as a separate function.

@lanceofwhichwedream
Copy link

lanceofwhichwedream commented Oct 18, 2024

I think I'm also impacted by this.

I'm using auto-entities with slider-entity-row. When I have slider enabled, the icon color is forcefully set to the state color for that light but if I disable slider-entity-row, it obeys my state color option.

image

Code

type: vertical-stack
cards:
  - type: custom:bubble-card
    card_type: pop-up
    hash: "#media-room"
    name: Media Room Lights
    icon: mdi:lightbulb-group
  - type: custom:auto-entities
    card:
      type: entities
      state_color: false
    filter:
      include:
        - area: media_room
          domain: light
          options:
            type: custom:slider-entity-row
            toggle: true
            card_mod:
              style: |
                :host {
                  --paper-item-icon-color: green;
                }
      exclude: []
    sort:
      method: friendly_name
      numeric: false
    card_mod:
      style: |
        :host {
          --state-light-active-color: var(--blue-color);
        }

The extra card mod was from where I thought I had been setting the css wrong to change the icon

image
Here I disabled entity-row and it obeys my paper-item-icon-color option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants