Custom-sidebar: manage Home Assistant's sidebar items per user or device basis

What does this do that a long press that activates the sidebar editor in baseline not do?

@jmyler12,

Check all the options in the documentation, all the possibilities are documented there. But just some things (among others) that you can achieve with this custom plugin and it is not possible natively:

  1. The changes are stored in a config file so if you logout and login again, they don’t get lost. The same applies to different devices, every time that you log-in in a device the configuration that match with your username is taken from the stored config.
  2. You can change the icon or rename the sidebar items
  3. You can move items to the bottom group of the sidebar
  4. You can dynamically add notifications to the items in the sidebar (for example, display the number of HACS updates as a notification in the HACS sidebar item)
  5. You can use JavaScript/Jinja templates in some of the elements

But as it is stated in the last section of the documentation, if you don’t need anything of this, it is probably that the built-in sidebar configuration options are enough for you.

1 Like

For those searching for another option…

just use the built in functionality…

Click and hold ‘Home Assistant’ text for a few seconds, release and edit!

Took me a while to find this!

4 Likes

Hi @Malc3667,

Read the message that I left before or consult the documentation. Custom-sidebar is not only to hide and reorder the sidebar items for the current user and the current session (as the built-in functionality) so the built-in functionality is not another option to achieve what this plugin achieves.

But as it is stated in the same plugin documentation, maybe for some users the built-in functionality, together with the built-in panel_custom and the panel_iframe features, is enough for their use cases. :slight_smile:

Regards

Hi @elchininet

is there a way to add a margin-top/bottom to a specific item? I tried to use that styles string in the main json area, but it did nothing.

I also want to ask if there is a way to add a collapsible menu with sub items inside. My sidebar list is starting to get long…

@mxp83,

The styles option should do the job if you want to add those margins/paddings, just post your code and I can guide you how to do it.

About the collapsible menu, at the moment it is not possible with this plugin. There was a proposal to implement it into Home Assistant but it was not merged. There is also this feature request that has not received much attention.

Here’s a snippet, I’m sure I’m writing it wrong but I didn’t see a reference in the repo:

  "title": "Home Assistant",
  "sidebar_editable": false,
  "styles": ".ha-scrollbar a:nth-child:(24) { margin-top:90px }",
  "order": [

the 24th item is where the bottom: true starts.

@mxp83,

The styles are added automatically to the shadowRoot of the sidebar, you only need to specify the items, and it is better that you set the styles in the paper-icon-item element not in the a one. Try with this instead:

"styles": "a[data-panel=\"logbook\"] > paper-icon-item { margin-top: 90px }"

Instead of trying to get the item by its index, try to get it by its data-panel, the previous example tries to get the Logbook item, change it to the item that you want.

this was perfect. Thank you for helping

1 Like

Hi @derekmarch,
Did you solve your issue?

I think so, thank you

1 Like

Good to hear that.
Regards :+1:

Hi there,

I just came here because i asked Google for an option to edit the sidebar. Is it really still not possible to edit the sidebar by default?

@daniel1to

Yes, it is possible to edit the order of the items or hide some of them per session and device natively without installing anything. You just need to go to to your account (clicking on your avatar and search for the Change the order and hide items from the sidebar section). The same is also possible if you long press the Home Assistant sidebar title.

This plugin is just if you want to go further and make multiple customisations without losing the changes if you log out or change the device.

Regards

Ok thanks for your help. This worked. Is it also possible to rename the first dashboard?

@daniel1to,

You can rename the dashboards natively but it will rename the dashboards for everyone. If you want to do it per user / device basis, it is not possible natively, you would need to use the custom plugin.

Hey, for me it is somehow not possible to rename the first entry in the sidebar menu. Maybe dashboard was misleading.

Hi @daniel1to,
That is also right, if you mean the default dashboard it cannot be edited. You would need to create other dashboards for that or use the custom plugin.
Regards

Can u link the plugin?

Thanks a lot for your help.

Hi @daniel1to,
It is linked at the beginning of this thread. This thread is about the plugin :slight_smile:
Regards

1 Like