-
Notifications
You must be signed in to change notification settings - Fork 15
Update Badges repeat on all custom entries #9
Comments
@galloween Any ideas on how to solve this? |
This was bothering me. I can submit a PR but I haven't been seeing much communication or activity on this repo by the author so it might go unmerged. (Edit - never mind, clearly wasn't looking in the right place! @galloween Let me know if you'd like me to submit a PR, or if you'd rather address this a different way) The problem is that when you add a new item it clones an existing item, modifies it, then appends it. If the cloned item has a badge, the new item will too. Here's my fix:
This will ensure any items that you're adding (instead of moving around) will not have the number badge. Side note: I struggled with getting Home Assistant to serve up a current version of the custom-sidebar-v2.js file instead of feeding me a cached copy (tried hard refreshing, clearing cache, restarting HA; always got the original copy). I ended up changing the .js filename (and updating the reference in my configuration.yaml's Second edit: Re-reading the original message in this issue, I'm wondering if this can happen to folks even when an item isn't flagged with "new_item": true. If this is the case, we could instead add another option to the entry items such as "badge": false. Just a thought. |
I just added your forked repo. |
@ianwitherow do you plan to maintain your fork? 😄 |
2022.4.0b0 introduces updates this is also introducing a badge with the number of updates for configuration.
Like below
but with custom sidebar, those updates are showing up on all custom entries and the badge is also offset a little, which is not showing the complete number.
like below
The text was updated successfully, but these errors were encountered: