kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.99k stars 233 forks source link

show_legend is not entity specific #1146

Closed Nickduino closed 1 day ago

Nickduino commented 1 day ago
type: custom:mini-graph-card
name: CO₂ et bruit
entities:
  - entity: sensor.interieur_carbon_dioxide
    show_state: true
    show_graph: true
    show_legend: false
    state_adaptive_color: true
  - entity: sensor.interieur_noise
    show_state: true
    state_adaptive_color: true
    show_graph: true
    show_legend: true
    line_color: blue
    color: lightblue
    y_axis: secondary
show:
  labels: false
  extrema: false
color_thresholds:
  - value: 600
    color: '#0c6114'
  - value: 800
    color: '#d35400'
  - value: 1000
    color: '#c0392b'
  - value: 1500
    color: '#9309b5'
font_size: 50
height: 78
layout_options:
  grid_columns: 2
  grid_rows: 2

Gives this result:

image

When I was expecting this:

image (Because it doesn't make much sense to color-code a legend when the line has a dynamic color)

ildar170975 commented 1 day ago

Legend must contain at least two entities.