Home Assistant release (hass --version
):
0.23.1
Component/platform:
UI
Description of problem:
I have the following configuration in a groups section:
Garage:
view: yes
icon: mdi:car
entities:
- camera.garage
- group.garage_switches
I would expect that the camera is the first entry on the page, and the switches are positioned below that. That isn't the case however, it seems the specified order is ignored and the order of configuration in the file is used.
This makes it impossible to re-use groups or components on other pages where I would like to have a different order.
Expected:
Follow the order of the entities as specified.
One way around this is to use the undocumented order: ##
feature.
Example:
group:
Garage:
view: yes
icon: mdi:car
entities:
- camera.garage
- group.garage_switches
customize:
camera.garage:
order: 1
group.garage_switches:
order: 2
Order is only for groups, is determined by the place in configuration.yaml and only matters for when it is sorting multiple group cards.
The view always renders groups first, then separate entities. So in your case your view contains a camera and a group, so it will render the group first. You can make the camera part of it's own group and add that to your view if you want it to appear above the other group.
That's true, but when I want to reuse that group (or individual entries) in a different view (say a view with all my cameras, besides views based on the locations in my house), I have no control over the order in that view, since the order in the file will be used.
馃憤 Would like to see more control over ordering of all entities.
Why not just order entities based on what order they are listed in the yaml file for each group/view? Seems like that would give you the most control.
馃憤 - I, too, want to be able to set the order in the view so that I can set the order of "bubbles". In addition, I would like to be able to insert a break or a separator to those entities. I envision something like this:
default_view:
view: yes
entities:
- sun.sun
- sensor.yr_symbol
- <SEPARATOR>
- device_tracker.phone1_s5
- device_tracker.phone2_s5
- <SEPARATOR>
- binary_sensor.motion_detector1
- binary_sensor.motion_detector2
- etc
Would this affect the ordering of entities in the History view, too? It's not clear to me how HA determines the order in that view.
Would love to see this as well. Currently it seems that groups, or items in the default_view are added at random. Would be nice if the default_view (or other views), had some consistency.
It's not random, if I remember.
The system puts entities in a column, and keeps on adding in the same column untill there are 5 entries (a group itself doesn't count, only it's children ). Next items will go to the next column. If all columns are taken the column with the smallest amount of entities is picked next. This is continued until all items are placed.
I agree that this system seems quite random, and maybe a more simple placing algorithm can be used...
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:
Ordering is still an issue in the latest version
There are a few things that need to be addressed in relation to ordering of components, groups and views. Right now the only ordering that is confirmed working is the order of components in groups.
I have found today that I can change the order in a view by changing the physical order of groups in the groups.yaml.
this may be related, but i'm not sure - is there a way to specify order of badges? it seems that no matter where i put them in the yaml file, it is always loading them in what appears to be alphabetical order...it follows the order they appear in the yaml file if i create a group, but the badges always seem to go in alphabetical order no matter how i place them.
I also would like to have more control over the ordering of entities in group and badges in a view.
You can arrange groups via the order in group file. But for sensors... Nothing can be done?
I found out that they are order alphabetically by friendly name (if set) or by name. I then tried a workaround by putting spaces at the beginning of the name. 6 items to order, put 5 space at the begining of the first, 4 spaces at the beginning of the second...
Try and get the nice surprise to see that apparently, HASS center the name without taking care of the heading spaces 馃憤
Thanks Memes11 for the hint, it's still the only working workaround I found.
A small addition in case someone else is looking for a solution: add ' ' around the friendly_name or the space wont have influence on the ordering.
For example:
media_player.tv:
friendly_name: ' Chromecast'
media_player.living_room_speaker:
friendly_name: ' Google Home'
media_player.bedroom_speaker:
friendly_name: ' Google Home Bedroom'
Most helpful comment
馃憤 Would like to see more control over ordering of all entities.