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

Web Server Component - allow custom order of elements #1774

Open
MagMeister opened this issue Jun 19, 2022 · 5 comments
Open

Web Server Component - allow custom order of elements #1774

MagMeister opened this issue Jun 19, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@MagMeister
Copy link

MagMeister commented Jun 19, 2022

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.

@nagyrobi nagyrobi added the enhancement New feature or request label Jun 22, 2022
@dmachadol
Copy link

Any update?

@jaggzh
Copy link

jaggzh commented Jul 31, 2023

Yeah this is annoying. Perhaps:

  1. Sort type: Defaulting to "alpha by name" for v2 backwards compatibility?
  2. 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.

@bilbs84
Copy link

bilbs84 commented Feb 29, 2024

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.

@smarthomedesign
Copy link

smarthomedesign commented Mar 29, 2024

hello all, i guess this idea was not implemented ?

@nagyrobi
Copy link
Member

Work in progress: esphome/esphome#6445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants