Tsar
(Christian)
February 13, 2025, 7:17am
1
Hi,
I have these individual devices defined :
Works fine, except I get them in an other order :
Is this a bug ?
tom_l
February 13, 2025, 7:24am
2
No not a bug. They are sorted by most energy used to least. This is not configurable.
https://www.home-assistant.io/dashboards/energy/#devices-energy-graph
I thought the same as @Tsar .
It does leave me wondering, what is the purpose of being able to reorder these items in the settings configuration screen?
tom_l
February 13, 2025, 8:45am
5
Hmm. it would appear that the ability to custom sort was added in December 2024:
home-assistant:dev
← karwosts:sortable-devices
opened 04:48PM - 18 Dec 24 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
Make the energy devices settings rows drag/drop sortable. It doesn't offer too much benefit, but it does affect the color of the devices, and maybe people want to organize their lists in a certain way for better visibility or something.
Often requested:
https://community.home-assistant.io/t/energy-management-reorganize-individual-devices/342280
https://community.home-assistant.io/t/wth-cant-i-reorder-devices-in-the-energy-dashboard/471502
https://community.home-assistant.io/t/wth-is-in-energy-dashboard-the-individual-devices-not-able-to-reorder/805051
## Type of change
<!--
What type of change does your PR introduce to the Home Assistant frontend?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (thank you!)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Example configuration
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR.
-->
```yaml
```
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue or discussion:
- Link to documentation pull request:
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] There is no commented out code in this PR.
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
<!--
Thank you for contributing <3
-->
[docs-repository]: https://github.com/home-assistant/home-assistant.io
This may have broken with the move to using echarts.js in the frontend in the 2025.2 release.
Open a frontend issue here: GitHub · Where software is built
This is an issue (not a feature request) as the feature was available and is now broken. Make sure you include that and the PR linked above.
My screen-shot above may only apply to the reusable dashboard card, not the card in the energy dashboard.
tmatheussen
(Tom Matheussen)
February 13, 2025, 8:53am
6
I think this custom sorting only affects the colors being used for each entity, not actually sort the entries in the charts
tom_l
February 13, 2025, 8:55am
7
All of the links in that PR description link to requests for device list order, not just colour.
Unfortunately I don’t understand the source all: Sortable energy individual devices by karwosts · Pull Request #23330 · home-assistant/frontend · GitHub
karwosts
(karwosts)
February 13, 2025, 9:54pm
8
All of the links in that PR description link to requests for device list order, not just colour.
That’s not how I interpreted it. The display has always been sorted by usage both before and after that PR. It was simply to allow to reorder the items in the list.
I had people tell me they would manually reorder the list by deleting all the entities and readding them in their desired order. This sort simply makes that easier, it does not remove the sorting from the display. It was just a very minor feature, wasn’t intended to be a big deal.