question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No "severity" colors in specific theme

See original GitHub issue

Hi , I have small problem with the custom card “bignumber-card” and also with “gauge-card” this is how its look in HA “default” theme screen shot 2018-08-05 at 21 12 23 and this is how its look in “dark-mode” theme

screen shot 2018-08-05 at 21 11 38
          - type: custom:bignumber-card
            title: temperature
            entity: sensor.sensibo1_temp
            scale: 20px
            from: left
            min: 15
            max: 45
            severity:
              - value: 27
                style: 'var(--label-badge-green)'
              - value: 30
                style: 'var(--label-badge-yellow)'
              - value: 45
                style: 'hsla(0, 100%, 33%, 1)'
########################################
dark-mode:
  primary-color: "#1172e2" ##7d34d6" # Primary (most of the UI)
  primary-background-color: "#282C34" # Primary background colour (dialogs, e.t.c)
  secondary-background-color: "#21252B" # Secondary background colour (main UI background)
  paper-card-background-color: "transparant" # Card background colour
  paper-item-icon-color: "#1172e2" #"#7d34d6" # Icon colour
  primary-text-color: "#EEEEEE" # Primary text colour
  secondary-text-color: "#474E5D" # Secondary text colour
  disabled-text-color: "rgba(255, 255, 255, 0.5)" # Disabled text colour
  divider-color: "rgba(255, 255, 255, 0.12)" # Divider colour
  paper-card-header-color: "#FFFFFF" # Card header text colour
  paper-listbox-background-color: "#21252B" # Listbox background colour
  paper-listbox-color: "#FFFFFF" # Listbox text colour
  paper-grey-200: "#282C34" # Listbox selected item background colour
  table-row-background-color: "transparant"
  table-row-alternative-background-color: "transparant"
  sidebar-icon-color: "#EEEEEE"
  sidebar-selected-icon-color: "#1172e2" #"#7d34d6"
  label-badge-red: '#C6C6C6'     

Another thing, there is a similar problem with the “gauge-card” like you can see here: screen shot 2018-08-05 at 21 24 08

              - type: custom:gauge-card
                title: Download
                entity: sensor.speedtest_download
                scale: '33px'
                min: 0
                max: 420
                severity:
                  red: 0
                  green: 250
                  amber: 370

this theme is “special” because there is no background to cards , any help?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
VDRainercommented, Aug 8, 2018

I changed the severityMap to fixed values in the gauge-card.js to avoid problems with dark themes.

    const severityMap = {
      red: "#e2120b",
      green: "#12c915",
      amber: "#fff600",
      normal: "#103ee5",
    }

Maybe add the value/style options like in the bignumber-card to the gauge severity object? Then you don’t have to hack the *.js or the theme and define the colors in the ui-lovelace.yaml.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No "severity" colors in specific theme · Issue #158 - GitHub
Hi , I have small problem with the custom card "bignumber-card" and also with "gauge-card" this is how its look in HA "default"...
Read more >
Is it possible to override component's severity colors by using ...
If you want to modify the background color in the theme, you can add a name to the theme, I provide you with...
Read more >
Change colors in background in accordance with the events ...
no, the colors associated with event severity levels in OMi cannot be reconfigured. Some UI components offer a "Dark theme", alternative to the ......
Read more >
Theme Color | Visual Studio Code Extension API
Theme Color reference that lists all themable colors in Visual Studio Code. ... errorBackground : Input validation background color for error severity.
Read more >
3.6 Managing Condition/Severity Colors
From the Format menu, select Condition/Severity Colors to open the Condition/Severity Color Settings dialog box. · Click the Choose a Supplied Color Theme...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found