kalkih / mini-graph-card

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

[FR] Allow specifying the primary entity #972

Open ex-nerd opened 1 year ago

ex-nerd commented 1 year ago

I'd love to be able to specify a primary entity other than simply defaulting to the first entity in the list. This would allow a card to be set up with a list of entities in pleasing visual (e.g. alphabetical) order, but the primary entity could be specified to surface the most pertinent/interesting/important sensor as the one to be highlighted by default.

For example: Looking at my example code from https://github.com/kalkih/mini-graph-card/issues/971, in order to get this to show to PM2.5 as the primary entity (this is by far the most interesting metric), I have to put that value first in the list. However, the legend then sorts out of order: PM2.5, PM1, PM10

ildar170975 commented 6 months ago

In short: primary entity - is the one whose state is shown on the left placeholder.