When I click on custom link added via panel_iframe: it opens the link but then creates a second sidebar

Anyway to make it not do the double sidebar when clicking on a link that’s been added via panel_iframe?

Trying to add a link to quickly pull up States

panel_iframe:
  states:
    title: 'States'
    url: '/developer-tools/state'
    icon: 'hass:gesture-tap-button'

Well, that’s technically correct. It is showing you the webpage you asked for - including the sidebar.

Balloob posted a solution tho this:

5 Likes

For future users (or for my future self in case I forget :wink: ) if you want to have more than one custom panel button that works as desired above you need to follow this structure, I got stuck thinking I had to give it a different name each time, but each one is still named “panel-redirect” as you’ll see blow, it’s the “url_path” that needs to be a unique name, here’s what I setup on mine to show both States & Server controls:

panel_custom:
  - name: panel-redirect
    # url_path needs to be unique for each panel_custom config
    url_path: redirect-states
    sidebar_title: States
    sidebar_icon: hass:gesture-tap-button
    module_url: /local/panel-redirect.js
    config:
      # Where you want to redirect to
      target: /developer-tools/state
  - name: panel-redirect
    # url_path needs to be unique for each panel_custom config
    url_path: redirect-server-controls
    sidebar_title: Server Controls
    sidebar_icon: hass:server
    module_url: /local/panel-redirect.js
    config:
      # Where you want to redirect to
      target: /config/server_control
4 Likes

I had to sudo mkdir /usr/share/hassio/homeassistant/www/before putting the js file in.
Is that assumption correct?

Not only will you need to make the www directory, you will also have to restart home assistant afterwards.