feature-requests
feature-requests copied to clipboard
Web Server Component - allow custom order of elements
In web server V1, the order in which elements are displayed in the web interface are determined by type (sensor, switch, ...) and the order in which they appear in the configuration file.
Since web server V2 the order is alphabetical by name.
It would be useful if it were possible to define an order for each element, in the style of a "z-index" and in second, the sorting could then be done alphabetically.
Any update?
Yeah this is annoying. Perhaps:
- Sort type: Defaulting to "alpha by name" for v2 backwards compatibility?
- Sort type: "index", uses an item's "sort_index: #" value (default 0). No errors -- components with the same index # receive the same rank and, thus, an arbitrary order.
For optional grouping, higher up hierarchy components could possibly also allow sort_index, where the sort would bring their children together. If not specified, perhaps a default of -1 would be useful, where they do not receive a sort. OR we have a "sorted: true/false" on them.
I'm a bit new to esphome config so I'm not sure how compatible this all is with the config philosophy.
For certain, I think this would be a fantastic idea. If only for testing and development. I usually interface with all my devices through HA, but when setting up a new device, getting it's calibrations right, etc, I do use the web server component, and it can be quite annoying when you have sensors that should be grouped, be at opposite ends of the list.
I hope something like this does get implemented in a future release.
hello all, i guess this idea was not implemented ?
Work in progress: https://github.com/esphome/esphome/pull/6445