Lovelace sensor graph lin color - 0.84.0

It seems the “line_color” parameter doesn’t work anymore since 0.84.0 for the sensor cards…
2018-12-12%2012_36_57-Window

***not theme related, tried default theme.

      - type: sensor
        entity: sensor.aeotec_zw100_multisensor_6_temperature
        name: Temp 1er
        graph: line                
        line_width: 8
        line_color: '#FF6384'
      - type: sensor
        entity: sensor.aeotec_zw100_multisensor_6_relative_humidity
        name: Humidité 1er
        graph: line                
        line_color: '#36A2EB'
        line_width: 8

Is there something I need to know or it’s just a bug?

***line_width either doesn’t work…

See the breaking changes.

oh, ok… it’s still in the lovelace docs (https://www.home-assistant.io/lovelace/sensor/), I figured if it was still there…
thanks!

Yeah I asked on discord on the dev channel to confirm it should be removed. Once I get a response Ill make the change to the docs. If not Ill report back here with a fix.

1 Like

Is there any way to configure the line color now, via themes.yaml?

How does lovelace choose the default color ? I had changed the line color before, all my sensor are orange (the color I set), and not blue as shown in the example picture. There is no line_color attribute in my config file.

I’m sure this functionality will be back soon ? :slight_smile:

And I second @ov1d1u on his question, is there a way to change the color for now ?

Create a theme with just one line in your themes.yaml.

th_sensor_temp:
  accent-color: "#c3423f"

Then use this theme in the sensor config

             - type: sensor
                name: Temperatur
                icon: mdi:thermometer-lines
                entity: sensor.esp8266_1_temperature
                graph: line
                detail: 2
                theme: th_sensor_temp

2 Likes

Is there a solution for more than one setting (in 0.87.1)?
I want to adjust the color with the user theme selection

use card modder and change the accent color for that card

1 Like

Have an example for me?

not exactly. I’ve yet to mod the color of the line. Here’s a link to the card:

Thanks for the link. I already installed it previously. Can’t seem to find an example of someone with line color modified in card-modder. All i see is line_color within a default sensor card…? Why did they took it off the default lovelace-ui sensor card? Way more easier imo

They took it off because it now pulls the color from your theme. So if you change your theme the color of the graph changes with it, which is what most people want. It was a request in the old card. All you need to do is find out what css object the color is pulled from and modify that color. I don’t know it off the top of my head.

Solved it with the custom:mini-graph-card.

      - type: custom:mini-graph-card
        name: Luminosity
        icon: mdi:brightness-6
        hour24: true
        points_per_hour: 2
        line_color: "var(--primary-color)"
        entities:
        - sensor.outside_lux
2 Likes

You are a genius - thank you!