GithubHelp home page GithubHelp logo

elchininet / custom-sidebar Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 2.0 1.09 MB

Custom HACS plugin that allows you to manage Home Assistant's sidebar items per user or device basis

License: Apache License 2.0

JavaScript 2.87% TypeScript 97.00% Shell 0.13%
custom-plugin custom-plugins custom-sidebar custom-sidebars hacs hacs-plugin home-assistant homeassistant javascript lovelace

custom-sidebar's People

Contributors

dependabot[bot] avatar elchininet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sdotter nilismith

custom-sidebar's Issues

`bottom: true` flag doesn't seem to work on most items

The bottom: true flag doesn't seem to work reliably. I'm not sure if it's a config issue at my end or not. In my config, I've marked config, developer-tools, and hacs as bottom: true, but only hacs seems to respect the flag and stick to the bottom.

Here's a screenshot:
image

and here's my sidebar-config.yaml contents:

sidebar_editable: false
order:
  - item: overview
    order: 1
  - item: todo
    order: 2
  - item: energy
    order: 3
  - item: config
    order: 4
  - item: developer-tools
    order: 5
  - item: history
    hide: true
  - item: snapshots
    hide: true
  - item: backups
    hide: true
  - item: map
    hide: true
  - item: media
    hide: true
  - item: calendar
    hide: true
  - item: logbook
    hide: true
exceptions:
  - user:
      - Akshay
      - akshay
    order:
      - item: overview
        order: 1
      - item: todo
        order: 3
      - new_item: true
        item: Overseerr
        icon: mdi:play-network
        href: http://192.168.1.115:5055/
        order: 2
      - item: backups
        order: 4
      - new_item: true
        item: Integrations
        href: "/config/integrations"
        icon: mdi:puzzle
        order: 5
      - new_item: true
        item: Automations
        href: "/config/automations"
        icon: mdi:robot
        order: 6
      - item: df2164f9_ps5_mqtt
        hide: true
      - item: developer-tools
        order: 10
        # hide: true
        bottom: true
      - item: config
        order: 9
        bottom: true
      - item: hacs
        order: 7
        notification: '[[[ state_attr("sensor.hacs", "repositories").length || '' ]]]'
        bottom: true
      - item: energy
        order: 8
      - item: history
        hide: true
      - item: snapshots
        hide: true
      - item: map
        hide: true
      - item: media
        hide: true
      - item: calendar
        hide: true
      - item: logbook
        hide: true

order not completely respected

having changed the setup to match several items, I still see the order not 100% repected the way it is set in the json:

left is Safari, right is Chrome

Scherm­afbeelding 2024-01-25 om 20 41 12

sidebar-config.json

Tried to rebuild it from scratch, and even reversed the order here, so first 'hide' all I want to hide, and next add the new order of menu-items.

Notably Cameras and Energie are completely wrong in Chrome and Safari.
The default 'Overzicht' (without color or notification in Chrome) is not hidden. Ive set that to hide with

        {
            "item": "/lovelace",
            "hide": true
        },

Other than that, Safari left seems to follow the json file order best, Chrome messes it up...

not sure where to go next, other than keep hitting refresh cache (which ofc I have done more than a few times now....)

edit

adding a closing / on these hrefs made them move in Safari correctly, which is now 100% as it was hoped for:

        {
            "item": "/ui-cctv/",
            "match": "href",
            "order": 6
        },
        {
            "item": "/energy/",
            "match": "href",
            "order": 7
        },
Scherm­afbeelding 2024-01-25 om 20 56 05

Chrome is still messy, although it did move the Energy item, albeit to the wrong spot, and keeps the default Dashboard (Overzicht)

Scherm­afbeelding 2024-01-25 om 20 57 01

json file not found

sorry to open the first issue, but after several weeks of fine operation, I suddenly see this happening in my system, and the sidebar is completely populated again:

Scherm­afbeelding 2024-01-25 om 15 54 40

I validated the json file is syntactically correct.

this is where it resides:

Scherm­afbeelding 2024-01-25 om 15 56 29

version:

Scherm­afbeelding 2024-01-25 om 15 54 47

Ive given it a few cache refreshes, and even restarted HA.

Only works properly with iPad companion app?

I really like the custom sidebar, but I've not been able to get it working fully.

When I use the Home Assistant App on my iPad the custom sidebar works as expected.

On Android (v13) in the Home Assistant App it does not work at all (normal Hass sidebar contents).

On my desktop in using an up to date Firefox browser it does not work until I manually refresh the page (I have tried completely clearing the cache, but it made no difference). I've checked the browser console and there are no error or warning messages.

Could you suggest what I can do to make it work as expected please?

This is my configuration:

title: Fernlea
sidebar_editable: false
order:

  • item: overview
    order: 1
  • item: configuration
    order: 2
  • item: energy
    order: 3
  • item: map
    order: 4
  • item: logbook
    hide: true
  • item: History
    hide: true
  • item: hacs
    order: 5
  • item: media
    hide: true
  • item: developer
    bottom: true
    order: 6
  • item: setting
    bottom: true
    order: 7
    exceptions:
  • user:
    • Zoe
    • Test
    • Ruby
      base_order: true
      order:
      • item: configuration
        hide: true
      • item: energy
        hide: true
      • item: map
        hide: true
      • item: logbook
        hide: true
      • item: History
        hide: true
      • item: hacs
        hide: true
      • item: developer
        hide: true
      • item: settings
        hide: true

id: fernlea_order

Two ways to bypass addon

Hello, it's me again. I might have found two ways to bypass the addon:

  1. When a user tries to change the order of the sidebar in his user-settings, the settings of the addon seem to be ignored.
profil-home-assistant-personlich-microsoft-edge-2024-02-12-15-40-23_D40K8l3Q.mp4
  1. When a user changes his language, the same thing happens

Sample config does not work

Hi there!

First of all, thank you very much for reviving this HACS repository!

I installed the custom sidebar yesterday, but I have some problems getting it to work.

Generally, it is loaded and works, however, it seems that I cannot hide default items in the sidebar. I just copied the example JSON config from the ReadMe, but the developer console of Chrome gives me the following:

≡ CUSTOM-SIDEBAR (JSON)v4.5.0
custom-sidebar-json.js?v1.0.1:1 custom-sidebar: you have an order item in your configuration that didn't match any sidebar item: "overview"
(anonymous) @ custom-sidebar-json.js?v1.0.1:1
custom-sidebar-json.js?v1.0.1:1 custom-sidebar: you have an order item in your configuration that didn't match any sidebar item: "terminal"
(anonymous) @ custom-sidebar-json.js?v1.0.1:1
custom-sidebar-json.js?v1.0.1:1 custom-sidebar: you have an order item in your configuration that didn't match any sidebar item: "history"
(anonymous) @ custom-sidebar-json.js?v1.0.1:1
custom-sidebar-json.js?v1.0.1:1 custom-sidebar: you have an order item in your configuration that didn't match any sidebar item: "snapshots"
(anonymous) @ custom-sidebar-json.js?v1.0.1:1
custom-sidebar-json.js?v1.0.1:1 custom-sidebar: you have an order item in your configuration that didn't match any sidebar item: "backups"
(anonymous) @ custom-sidebar-json.js?v1.0.1:1
custom-sidebar-json.js?v1.0.1:1 custom-sidebar: you have an order item in your configuration that didn't match any sidebar item: "map"
(anonymous) @ custom-sidebar-json.js?v1.0.1:1
custom-sidebar-json.js?v1.0.1:1 custom-sidebar: you have an order item in your configuration that didn't match any sidebar item: "energy"
(anonymous) @ custom-sidebar-json.js?v1.0.1:1
custom-sidebar-json.js?v1.0.1:1 custom-sidebar: you have an order item in your configuration that didn't match any sidebar item: "media browser"
(anonymous) @ custom-sidebar-json.js?v1.0.1:1
custom-sidebar-json.js?v1.0.1:1 custom-sidebar: you have an order item in your configuration that didn't match any sidebar item: "config"
(anonymous) @ custom-sidebar-json.js?v1.0.1:1
custom-sidebar-json.js?v1.0.1:1 custom-sidebar: you have an order item in your configuration that didn't match any sidebar item: "logbook"
(anonymous) @ custom-sidebar-json.js?v1.0.1:1
custom-sidebar-json.js?v1.0.1:1 custom-sidebar: you have an order item in your configuration that didn't match any sidebar item: "developer tools"

Any idea what could be going wrong? Thanks!

Sidebar title

Hi!
I tried to customize the sidebar title with the template.
However the customization works ONLY on my tablet.

  1. It does not work on the smartphone companion app;
  2. It does not work on the desktop. On the desktp, however, I noticed that if I restart HA I see the customization for about a minute but, once the startup is complete, the classic "My Home" returns.
    From the developer tool I see:

brave_rOxbrPCrHq

What could it be that continuously updates the title and does it override the customization?
Thanks

Cant hide media player

Hey, im trying to hide the media player/browser, but i cant seem to get it right. The integration does work (tried it with the file you provided).
Here's my config

order:
  - item: media browser
    hide: true
exceptions:
  - user:
    - test
    base_order: false
    order: []
id: 

Any idea what i might have gotten wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.