Villhellm / custom-sidebar

Custom Sidebar for Home Assistant
115 stars 23 forks source link

Edit order of Lovelace Dashboards #8

Closed bitwon closed 4 years ago

bitwon commented 4 years ago

Would it

chrome_JOKOyAQwgy

Will it be possible in the future to change the order of the Lovelace dashboards manually.

Currently the order is always like this:

For "Einstellungen", I did a little trick with a "zero-width space"as prefix...

Villhellm commented 4 years ago

This is already possible with custom-sidebar. If it is not working, please share your sidebar-order.yaml file.

bitwon commented 4 years ago
order:
  - item: overview
  - item: Übersicht
  - item: lovelace-og
  - item: loveace-eg
  - item: lovelace-einstellungen

# Bottom
  - item: logbook
    bottom: true
  - item: Logbuch
    bottom: true
  - item: history
    bottom: true
  - item: Verlauf
    bottom: true
  - item: map
    bottom: true
  - item: Karte
    bottom: true
  - item: terminal
    bottom: true
  - item: core-ssh
    bottom: true
  - item: deconz
    bottom: true
  - item: developer
    bottom: true
  - item: Entwicklerwerzeuge
    bottom: true
  - item: hacs
    bottom: true
  - item: Supervisor
    bottom: true
  - item: file editor
    bottom: true
    icon: "mdi:file-document-edit"

image

Villhellm commented 4 years ago

You need to remove lovelace- from each of the entries. Like the docs say, you need to match what you see in the sidebar.

I'll push a release so you can specify "exact" string matches instead of just substrings because it's most likely going to break with items with such short names.

Also you have a typo toward the bottom Entwicklerwerzeuge, which is why it's not working there

bitwon commented 4 years ago

@Villhellm Thanks for supporting. I updated to version 1.4 and adapted the config for testing to the following:

order:
  - item: EG
    exact: true
  - item: overview
    exact: true
  - item: Übersicht
    exact: true
  - item: OG
    exact: true
  - item: Einstellungen
    exact: true

# Bottom
  - item: logbook
    bottom: true
  - item: Logbuch
    bottom: true
  - item: history
    bottom: true
  - item: Verlauf
    bottom: true
  - item: map
    bottom: true
  - item: Karte
    bottom: true
  - item: terminal
    bottom: true
  - item: core-ssh
    bottom: true
  - item: deconz
    bottom: true
  - item: developer
    bottom: true
  - item: Entwicklerwerkzeuge
    bottom: true
  - item: hacs
    bottom: true
  - item: Supervisor
    bottom: true
  - item: file editor
    bottom: true
    icon: "mdi:file-document-edit"

But I'm not getting what I expected: image

Maybe you see the problem 🙈

Villhellm commented 4 years ago

That was my bad, I forgot there were invisible characters to filter out. The newest release should fix it 🤞

bitwon commented 4 years ago

Nice 😍, it works perfect!