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

"state_adaptive_color" option is confusing since the left "state" text is used for displaying states for all entities #698

Open
ildar170975 opened this issue Jan 19, 2022 · 4 comments · May be fixed by #1217
Labels
enhancement Something that can be improved released on @dev

Comments

@ildar170975
Copy link
Collaborator

The state_adaptive_color may be used to visually associate a displayed state with a corresponding graph:
image

type: custom:mini-graph-card
entities:
  - entity: sensor.cleargrass_1_temperature
    name: Temp
    show_state: true
    color: red
    state_adaptive_color: true
  - entity: sensor.cleargrass_2_co2
    name: CO2
    show_state: true
    color: green
    state_adaptive_color: true
    y_axis: secondary
show:
  name: false
  icon: false

If some point is selected on the 2nd graph then the left "state" text contains a value for this point:
image
This confuses since the label has a value for the 2nd entity and a color for the 1st entity.

Suggestion:
If some point is selected for some entity and this entity has the state_adaptive_color: true option, then set the text color accordingly to this entity.

@akloeckner
Copy link
Collaborator

fixed in #1214

Copy link

🎉 This issue has been resolved in version 0.13.0-dev.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@ildar170975
Copy link
Collaborator Author

There is still a problem.
Assume we have state_adaptive_color: true for ONE entity defined only:

type: custom:mini-graph-card
entities:
  - entity: sensor.xiaomi_cg_1_co2
    color: red

  - entity: sensor.xiaomi_cg_2_co2
    show_state: true
    color: green
    state_adaptive_color: true

Then the 2nd entity's state is not colored when SELECTED:
Image

@ildar170975 ildar170975 reopened this Feb 16, 2025
@ildar170975 ildar170975 linked a pull request Feb 25, 2025 that will close this issue
@ildar170975
Copy link
Collaborator Author

With #1217 I see the issue fixed.

@akloeckner akloeckner linked a pull request Feb 25, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something that can be improved released on @dev
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants