Villhellm / custom-sidebar

Custom Sidebar for Home Assistant
115 stars 23 forks source link

Error in chrome 80.0.3987.163 (Official Build) (64-bit) #2

Closed pkishino closed 4 years ago

pkishino commented 4 years ago

installed as per instructions (except moved it to /www/custom-ui/custom-sidebar/custom-sidebar.js and updated url in configuration.yaml and in the js to the sidebar-order.yaml file) when loading the following error shows: custom-sidebar.js:7 Uncaught SyntaxError: Unexpected token '<'

problem with the DOCTYPE tag

Villhellm commented 4 years ago

I'm having trouble replicating the error. Can you post your sidebar-order.yaml contents, the exact path of sidebar-order.yaml, whatever changes you made to the js file (?), and your frontend config?

pkishino commented 4 years ago

path: .homeassistant/www/custom-ui/custom-sidebar/custom-sidebar.js & sidebar-order.yaml in same folder sidebar-order.yaml:

order:
  - item: history
    hide: true
  - item: logbook
    bottom: true

does this need to contain ALL items you want to show or can I, as above, only specify that history should be hidden, and use default for others?

from configuration.yaml:

frontend:
  themes: !include_dir_merge_named themes
  javascript_version: latest
  extra_module_url:
    - /local/custom-ui/custom-sidebar/custom-sidebar.js

changes to custom-sidebar.js, only changed the path to sidebar-order.yaml:

<span class=pl-s>&quot;/local/custom-ui/custom-sidebar/sidebar-order.yaml?rnd=&quot;</span>
Villhellm commented 4 years ago

I have no idea where that span came from... that’s not anywhere in custom-sidebar.js

pkishino commented 4 years ago

my bad... forget this issue, wrong file loaded..downloaded link not the raw file ..lol