It doesn’t work quite the way it is described here, but I defiantly managed to squeeze some usefulness out of it.
Here is my code, it may help someone figure out the naming convention of the sidebar links:
const settings = {
defaultPanel: '"lovelace"',
dockedSidebar: '"docked"',
enableShortcuts: "true",
hiddenTabs: "{}",
selectedLanguage: "null",
selectedTheme: '{"dark":true}',
sidebarHiddenPanels: '["energy","map","overview","core_configurator"]',
sidebarPanelOrder:
'["dashboard-time","dashboard-basement","1st-floor","2nd-floor","dashboard-spacer","config/devices","config/integrations","config/automation","dashboard-spacer-2","config/logs","logbook","hassio/dashboard","hacs","developer-tools/yaml","a0d7b954_vscode","7094bb28_docker_wyze_bridge","cebe7a76_hassio_google_drive_backup"]',
suspendWhenHidden: "true",
vibrate: "true",
};
Here’s what I found works.
I added that code to www/config.js as described above. And then call it as an extra_module_url:
in configuration.yaml.
Make some tweaks to config.js as desired. See the tweaks by emptying the browser cache (hard refresh).
But some settings can’t be set this way and will be reset every time you hard refresh. For example, Primary and Accent colors keep resetting.
So once I was happy with the sidebar order I disabled the script by commenting out the line in configuration.yaml and then reboot HA.
Now I can set the colors and they won’t get reset by a hard refresh.
So then I go to another browser or device and log in to my HA instance. The sidebar is a mess because, of course, the custom profile settings do not roam between devices.
So now I uncomment the line in configuration.yaml (which means custom.js is being called again).
I reboot HA and refresh device #2 and bingo my custom sidebar order is now carried over to the 2nd device.
Once again I comment out that line in conguration.yaml and reboot HA.
I can now set my custom colors on device #2 and I’m done.
Clear as mud?
This sounds a bit convoluted but, speaking for myself, it is actually much easier than to constantly reorder all of my sidebar items each time I use a new browser, device, URL, clear my cookies, etc.
Thanks for sharing, @ndbroadbent.