ha-sankey-chart icon indicating copy to clipboard operation
ha-sankey-chart copied to clipboard

Alignment and sorting of entities

Open cromelex opened this issue 2 years ago • 2 comments

Thanks for the great work on this card, found it today and it can really provide some cool insights.

Is your feature request related to a problem? Please describe. I put together a chart with it as a mock, and there's a couple of enchancements I'd like to see:

  1. Ability to autosort entities based on value(say, highest to lowest) instead of the current discrete order, for a given level. Say, if I have a chart with Grid/Power source -> Rooms -> categories -> individual items, I might want to keep the sources and rooms in the same order, but i might want the categories or individual items to be sorted by value instead.

  2. Have the abiliy to display an entity on a lower level, if that makes sense? Going with the previous example: Grid/Power source -> Rooms -> categories -> individual items

Within a room I have categories "Electronics" , and then have 2 individual devices, "steambox" and "light". "steambox" is a child of "electronics", but "light" is orphan within Rooms. I would like to have the option to display the "light" entity at the same level as "steambox", without having to create an additional sensor for the category.

Describe the solution you'd like It could be a good idea to have the option to autosort the entities by their value within a specific level of the chart.

Additional context screenshot example for point 2. https://i.imgur.com/WUwhICp.png

Thanks!

cromelex avatar May 18 '22 12:05 cromelex

  1. Makes sense if your values don't change too often. Otherwise the UI will jump around a lot
  2. This is already planned, actually. "connections accross sections" in the README

MindFreeze avatar May 18 '22 13:05 MindFreeze

Thank you. Missed the bit about item 2 in the readme (as in, I didn't understand that this was what it meant).

Agree with you on item 1, but saw the option to set a throttle was already planned. I think it would definitely be a pre-requirement for 1, to avoid the jump around.

cromelex avatar May 18 '22 13:05 cromelex