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.

bug(color_thresholds): defaults to black instead of closest out-of-bounds color

See original GitHub issue

I have a graph meant to graph wind speed in different colors as you can see in the code. Though I find myself with an issue, if the color threshold value its not reached, the color it uses is black until (if it ever does) reaches the next value, In the image below you can see that in never reached purple color value, and therefore it started graphing towards black, if it ever reached the purple value, then the graph would be render towards that color.

How can I fix this?

Am I doing something wrong or is this an issue with the card

Captura de pantalla 2022-03-17 a las 11 18 06

  - type: custom:mini-graph-card
    entities:
      - entity: sensor.aemet_wind_speed_kts
      - entity: sensor.aemet_wind_bearing
        show_state: true
        y_axis: secondary
        color: var(--accent-color)
    name: Viento 7d
    icon: mdi:weather-windy
    line_width: 1
    font_size: 70
    animate: true
    color_thresholds:
      - value: 5
        color: '#0095a6'
      - value: 10
        color: green
      - value: 16
        color: orange
      - value: 24
        color: red
      - value: 30
        color: purple
    hours_to_show: 168
    points_per_hour: 0.2
    lower_bound_secondary: 0
    upper_bound_secondary: 360
    show:
      average: true
      legend: false
      extrema: true

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:9

github_iconTop GitHub Comments

2reactions
StormyKnight17commented, Mar 18, 2022

I noticed this too, it seems that color names don’t always work. If I use ‘#######’ it does render correctly for me.

0reactions
jlsjonascommented, Nov 13, 2022

Sadly enough I’m having a hard time reproducing the issue…

Could someone try to reproduce it on a demo instance of HA? Attempted with several iterations of the following config:

      - type: custom:mini-graph-card
        hours_to_show: 1
        points_per_hour: 120
        lower_bound: 0
        upper_bound: 1000
        smoothing: false
        height: 600
        show:
          extrema: true
        entities:
          - entity: sensor.random_0_1000
            name: log(150 - 1000) Simple
            aggregate_func: last
        color_thresholds:
          - value: 0
            color: green
          - value: 200
            color: red
          - value: 1000
            color: blue

ended up with: image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tool icons color are with black instead of normal
Tool icons color are with black instead of normal. Icons such as colors, text, etc. are not the default color, it is black,...
Read more >
global threshold: default color for warning renders black #108
When setting a global threshold, the Color Mode "warning" is rendering "black" instead of the designated color. Selecting the same color in ...
Read more >
Vulpaphyla's Energy Color Appearing as Black Instead of ...
When I have my Panzer Vulpaphyla set to "defaults" for all colors, ... However, its actual energy color is black, meaning the Viral...
Read more >
If Twitter's dark mode has recently changed for you, you're not ...
Twitter added a new dark mode to its site, which makes the site black instead of dark blue. A bug caused some users...
Read more >
Graphmatica Bug Reports
Bug 87: Copy graphs... Color uses default gray instead of black or white color scheme. Symptom: Copy graphs color (both BMP and EMF...
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