-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working on core-2021.11.0b0 #40
Comments
Same issue here, with version 2021.11b1. It shows the following error: Logger: frontend.js.latest.202110280 http://192.168.178.2:8123/hacsfiles/custom-sidebar/custom-sidebar.js:162:66 Uncaught TypeError: Cannot read properties of null (reading 'setAttribute') |
The developer of this has passed away and so it is no longer maintained. Unless someone makes a fork and continues to support it I suggest you find an alternative. |
I'm thinking this change here looks like the culprit: home-assistant/frontend#10342 |
The issue is the same with the release version
|
Still the same errors in 2021.11.1, anyone looking at it? |
I've started to look at this, but I think it will be tricky as Home Assistant has switched to including SVGs as actual SVG code imported into the |
I resolved to removing items via the native interface, and adding new ones using this It doesn't give the ability to put things in the "bottom half" unfortunately, but I'll live with it until someone better than me with JS comes along 😅 |
wouldn't it be possible to use the whole svg content instead of only the name in |
Hi, tried @balloob script but it doesn't seem to work 'out of the box' - some links need to be changed/fixed. could you please show how you managed yours please? thanks! |
I just followed the directions at the top of the gist. |
Perhaps panel_custom functionality could be leveraged here since it still supports adding icons by their mdi reference?
The solution provided by @balloob works very well for adding HA configuration items. I'm mostly interested in adding custom items to the sidebar that open external resources in a new browser window as the custom-sidebar previously allowed. My primary use case is a sort of "global bookmarks" config. My wife and like to simply tap on an item from the HA sidebar from our mobile apps (one ios and one android) or other devices and launch our local services without the need to remember all of the IP/hostnames/ports for each one. While this can sometimes be accomplished through use of panel_iframe, there are downsides which we don't prefer such as the fact that not every application plays nicely inside a frame. We would rather open in our native/preferred web browsers instead. |
@jakemauer As another possible option, iconify appears to generate SVG output from a given icon: It has the ability to be bundled in an offline fashion: |
I have used panel_custom to add new items with icons but still use sidebar-order to move them to the bottom and to hide certain items from other users. Make sure in sidebar-order.yaml the item is not new_item: true and only item with no href or icon. Example below. sidebar-order.yaml order:
configuration.yaml panel_custom:
Not ideal but until Home Assistant has better admin control of which users can see what sidebar items, I cant use panel_custom alone which is misssing that feature. |
This is breaking the custom-sidebar plugin since HA 2021.11.0. There's other instances of ha-icons but they don't seem to be affecting so I currently don't see any reason to change them. fixes Villhellm#40
dear all, i refactored the original code to make it work again. UPDATE: |
I removed the HACS version, added your new custom-sidebar to /local/, set up the config in-file, added the extra module to my main configuration, then restarted HA. In the config I have hidden some items (such as Energy) and also added a couple new ones (Server Controls and a "Cookbook" item which points to a resource that is external to HA). I'm seeing mixed results across different browsers. I am running latest android HA Companion App and I've already closed the app, force-stopped it, then cleared cache before re-launching.
This is my current config:
Thanks! |
@eth0up thanks for reporting this! fixed the issue and updated the code, |
@galloween is there any reasons why you changed the config, considering everything else is done via yaml? For anyone else that already used the original code the fix by @valleedelisle works on my installation no need to do anything but change |
@pooyashahidi |
you can now install the new version as any custom repository in HACS: |
The latest v2 (via HACS) is working very well for me, to include opening external links in new window. Thanks! |
I don't see your repository in HACS |
@lustyffh You have to add a CUSTOM repository. You can find the instructions for a hacs installation here |
@galloween Is it possible to add back Exceptions in the new version? |
apologies, my bad at reading =(. it's all working now |
@Georgegipa Done! please update via HACS and let me know if it works for you :)
|
@galloween Sorry for the late response. The exceptions part works great for my user , but for the 2nd user it doesn't display the new item . Also for all my other users that use greek the sidebar doesn't change(default one). Here is my config:
|
@gilbert-grape (in chrome you can right-click the refresh button and choose "empty cache and hard reload") maybe there is something wrong in the json - can you post it? also, you installed through HACS, right? |
@Georgegipa will take a look tomorrow! meanwhile, as for greek titles, you should double-check if you use the right name. Alternatively you can try to use the text from the
also while you are at it, check the |
thanks for the fast answer
` ` |
@gilbert-grape
are you sure you are editing the right file? in the built-in file-editor, the path should look like this: |
@gilbert-grape Ignore the 10 times error, its by mistake. Fixed it in another update just now. as for the main issue, last thing to check is that you have added the js file to the config.yml: other than that, maybe you could try to remove the plugin and re-install it again... |
I know, but thanks. The problem with the default sidebar is, that you can add only the available menu elements. But mine is not in the list - so your sidebar is the key. |
|
@gilbert-grape @galloween |
oh!! thats actually a great advice - to clear site data (along with the cached old config json) !!! In Chrome you can do it either by: or by:
thanks @Centazi ! |
@Centazi @galloween |
@gilbert-grape |
@galloween I don't know if you're monitoring this thread, but I can't quite seem to get your code to work |
Just upgraded to HomeAssistant core-2021.11.0b0, this stopped working.
Tried new browsers, clearing the cache, nothing worked.
The text was updated successfully, but these errors were encountered: