Lovelace autogen sortorder

Hi everyone,

What is the logic of sortorder in an automatic generated lovelace dashboard?

I have few devices added to the same area.

If I take a look at the “areas”, entities are sorted alphabetically.
If I take a look at the lovelace (automatically generated) dashboard, entities seem to be ordered randomly…

I know I can manually edit dashboards, but I want to have at least one automatically generated.

How can I change the sortorder in an autogen dashboard?
What’s the logic behind the sortorder?

Grtz
B