This is probably an old issue but I have not seen a resolution in the Groups documentation.
I was hoping that, if I put everything in groups, then they would be displayed in the order given in the entities list.
default_view: view: True icon: mdi:home entities: - group.alarms - group.lights - group.back_door_lock - group.temperature_control
Instead, the order displayed in Chrome and IOS is
`- group.back_door_lock
group.temperature_control
group.alarms
group.lights`
I am at v0.46.0
Seems like a reasonable expectation. What am I missing?
My GUI order does not follow the order the groups are defined in. I am defining the groups within the .yaml file directly instead of in groups.yaml. Would that make a difference?
the order from top to bottom that groups are defined is the order in which they will appear on the frontend. if you add these groups to a view (defined in the same section as other groups) the groups will appear on the front end in which the groups were defined, NOT the order you list them in the view definition.
this will display the groups on the frontend in a new view called “View 1” and the groups will display in the order of:
Group 1
Group 3
Group 2
This is also true for the order in which other components such as switches, lights, automations, etc are defined. It doesn’t matter the order you list them in the group or view definition, it only matters the order in which the component/entity was defined.
Agree this has also changed in a recent release when i went to 0.57 all my views changed. I normally order group/ front end order by changing the group order in customize.
As an example changing “group.front_door” [group id 57] and “group.upstairs_door” [group id 56] i would expect the position to swap on the front end but this does not happen.
I agree that the ordering seems a bit strange. I’ve split the groups into several yaml-files and it seems impossible to tell which order the views will appear in. I suggest a new index-property in the group definition and that the groups/views will be ordered by that value.
This will make the groups appear in order of group 2, group 3, group 1.
However, if people read what I posted, the group and entity display order depends on the order in which they are defined not in the order they are listed in the view. Sure the documentation may be lacking but once you play around with the ordering you’ll understand what it does and how to work with it.
Well I’ll be… I just checked my configuration and yes, 0.57+ changes this behavior. group entities appear in the order in which they are listed and not in the order they are defined. However, in the case of listing groups and components in a view, it depends on the order they were loaded/defined. I have a camera for local radar and two groups for weather information in a view. the are listed as camera, group1, and group2, but they appear on the frontend as group1, group2, camera.
so device specific group ordering? Not sure you can do that. HA doesn’t know what device is looking at it, it only knows that someone is looking at it. You could possibly incorporate an input_boolean that would toggle views/ordering but you would have to remember to flip the switch on the frontend each time you change devices
I used to use customize as below but changing order “11” to “12” for example the entities do not change place, i am sure in previous versions this was not an issue
“the group and entity display order depends on the order in which they are defined”
For me this is problem because I’ve divided the groups.yaml into several files making order a bit difficult to grasp. Renaming the files in alphabetical order didn’t work…
Thank you for the update using customize to order the groups - this solved my problem!