Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adaptive_color feature not working correctly with binary values #1159

Open
enselerizer opened this issue Oct 14, 2024 · 0 comments
Open

adaptive_color feature not working correctly with binary values #1159

enselerizer opened this issue Oct 14, 2024 · 0 comments

Comments

@enselerizer
Copy link

Sorry in advance if this issue is a duplicate.
I am using mini-graph-card to display state history of binary sensors. It works great, and even color_thresholds feature colors the graph correctly, as shown in an example below. However, name_adaptive_color and icon_adaptive_color features don't seem to work with binary values, always displaying a color that is mapped to zero value.

Here is an example:

type: custom:mini-graph-card
icon: mdi:door-closed
name: Office door state
hours_to_show: 24
points_per_hour: 10
update_interval: 1
animate: true
hour24: true
lower_bound: 0
upper_bound: 1
aggregate_func: max
line_width: 4
color_thresholds:
  - value: 0
    color: "#76FF03"
  - value: 0.6
    color: "#FF1744"
entities:
  - binary_sensor.access_control_module_v1e_office_door
state_map:
  - value: "off"
    label: " "
  - value: "on"
    label: " "
  - value: unavailable
    label: " "
show:
  fill: fade
  points: false
  labels: false
  name_adaptive_color: true
  icon_adaptive_color: true

Resulting card appearance:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant