How to change the order of siblings in the model?

In the semantic model (http://openhab:8080/settings/model/) I have something like this:

Property
  Back Yard
  Front Yard
  House
    Ground Floor
    Upstairs

And then say I add another item, let’s call it First Floor, under House, and I end up with this:

Property
  Back Yard
  Front Yard
  House
    First Floor
    Ground Floor
    Upstairs

But what I actually want is this:

Property
  Back Yard
  Front Yard
  House
    Ground Floor
    First Floor
    Upstairs

How can I do that, short of deleting everything and starting anew?

Don’t tell me it’s alphabetic order display…

You are talking about locations? Because your example is more like a location..

You can change the order by clicking the “edit” symbol on your home page.

grafik

Then you go to the “Code” page and see “cardOrder”:

grafik

1 Like

You don’t need to change the code manually to adjust the order.

Click on the edit icon → By default “Locations” will be selected. You can toggle which Locations get shown here and there is a “Reorder” button on the right. You can toggle which ones are shown and change the order for Equipment and Properties too.

image

I can’t remember how/whether it’s possible to add separators though. You might need to use the code tab for that.

2 Likes

If you want to have it sorted in the model view, just add metadata „Default Widget Order Index“ to each entry in the model.

2 Likes