Skip to content

Fill color problem when line is flat #1080

Description

@jhemak

Hello! Thanks for creating such a great card! I am seeing a problem similar to #652.

When the line is flat, the line is the wrong color (even though the icon is the correct color).

type: custom:mini-graph-card
name: Battery Charge
entities:
  - entity: sensor.apc_battery_charge
hours_to_show: 6
points_per_hour: 1
decimals: 0
color_thresholds_transition: hard
color_thresholds:
  - value: 20
    color: '#ff0000'
  - value: 50
    color: '#ffa500'
  - value: 80
    color: '#008000'
show:
  labels: false
  points: false
  icon_adaptive_color: true

1

When I add the lower_bound, the line turns the correct color but the fill is strange.

type: custom:mini-graph-card
name: Battery Charge
entities:
  - entity: sensor.apc_battery_charge
hours_to_show: 6
points_per_hour: 1
decimals: 0
lower_bound: ~0
color_thresholds_transition: hard
color_thresholds:
  - value: 20
    color: '#ff0000'
  - value: 50
    color: '#ffa500'
  - value: 80
    color: '#008000'
show:
  labels: false
  points: false
  icon_adaptive_color: true

2

Would be great if you can take a look at it when you have time. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions