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

Text Color #171

Open
cataseven opened this issue Sep 22, 2023 · 0 comments
Open

Text Color #171

cataseven opened this issue Sep 22, 2023 · 0 comments

Comments

@cataseven
Copy link

Hi,

I want to change the text color of 3 out of 4 bar. When I use below code nothing happens and text color remains as primary color (white) for the first bar;

type: custom:bar-card
entity_row: false
entities:
  - entity: sensor.epson_l5290_series_black_ink
    severity:
      - from: '21'
        to: '100'
        color: Black
      - from: '20'
        to: '0'
        color: Red
    name: Black
    positions:
      icon: 'off'
      indicator: inside
    height: 30
    **style: |-
      bar-card-name {
        color: black;
      }**
  - entity: sensor.epson_l5290_series_cyan_ink
    severity:
      - from: '21'
        to: '100'
        color: Cyan
      - from: '20'
        to: '0'
        color: Red
    name: Cyan
    positions:
      icon: 'off'
      indicator: inside
    height: 30
...
....
.....
....

When I use below code, it changes 4 of them to white. This is ok.

type: custom:bar-card
entity_row: false
**style: |-
  bar-card-name {
    color: black;
  }**
entities:
  - entity: sensor.epson_l5290_series_black_ink
    severity:
      - from: '21'
        to: '100'
        color: Black
      - from: '20'
        to: '0'
        color: Red
    name: Black
    positions:
      icon: 'off'
      indicator: inside
    height: 30
  - entity: sensor.epson_l5290_series_cyan_ink
    severity:
      - from: '21'
        to: '100'
        color: Cyan
      - from: '20'
        to: '0'
        color: Red
    name: Cyan
    positions:
      icon: 'off'
      indicator: inside
    height: 30
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

1 participant