Navigation in dashboard sends me to wrong dashboard

Hi everyone,

I’m currently struggling with my setup. I use UI Lovelace Minimalist for my Dashboards and after successfully creating my first dashboard, I wanted to develop my second (mobile) one. Unfortunately, the navigation is not working as expected.

So, based on this documentation, I’ve created a second ui-lovelace-2.yaml file in the config/ui_lovelace_minimalist/dashboard/ with the content:

---
button_card_templates: !include_dir_merge_named "../../custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/"

title: "Minimalist-Mobile"
theme: "minimalist-mobile"
background: "var(--background-image)"
# views: !include_dir_merge_list "views/"
views:
  - !include views/home-mobile.yaml
  - !include views/Wohnzimmer-mobile.yaml

I also added the following part in the configuration.yaml:

lovelace:
  mode: storage
  dashboards:
    lovelace-minimalist-2:
      mode: yaml
      title: Minimalist Mobile
      icon: mdi:cellphone
      show_in_sidebar: true
      filename: ui_lovelace_minimalist/dashboard/ui-lovelace-2.yaml

Of course, I restarted afterwards :slight_smile: and the dashboard is showing in the sidebar.

I then changed my navigation action in my dashboard (Home-mobile.yaml):

title: "Home Mobile"
path: "Home-mobile"
type: custom:grid-layout
layout:
   ...
cards:
   ...
      - type: "custom:button-card"
        template:
          - card_room
          - grey_no_state
        name: Wohnzimmer
        entity: light.wohnbereich
        icon: hue:room-living
        tap_action:
          action: navigate
          navigation_path: "/ui-lovelace-minimalist/Wohnzimmer-mobile"
        variables:
          label_use_temperature: false
          label_use_brightness: false
          entity_1:
            entity_id: light.wohnbereich
            templates:
              - yellow_on
            tap_action:
              action: toggle

The Wohnzimmer-mobile.yaml conf:

title: "Wohnzimmer Mobile"
path: "Wohnzimmer-mobile"
type: custom:grid-layout
layout:

After reloading the dashboard, the navigation brings me to my Main Dashboard (Home) not the expected Wohnzimmer-mobile I also tried a private window to avoid cache issues.

Please, also see the file tree:

I’m not sure where I made a mistake or if it is a bug, but I’m deeply thankful for any advice.

Best regards,
wit4r7

The default dashboard that is opened is in your profile. Click on your initials at the bottom left of the screen and scroll down to “Dashboard”. Note that this is stored in a cookie, and is therefore different on each browser/machine.

Thanks for your answer, but I think I made my problem clear enough.

Of course, I have selected my Mobile-dashboard as default for my iPhone. But, after pressing the button / selecting the navigation action, it brings me to my default (desktop) dashboard.

Like: I’m on Mobile → pressing a button → navigate to Dekstop Dashboard instead of mobile.

Ah you didn’t mention you were clicking the button, so not clear to me. The URL should have the name defined in the config under “dashboards:”, and then the path of the view. So you would use “/lovelace-minimalist-2/Wohnzimmer-mobile”.

Thanks for the solution. Please be so kind and explain to me the logic behind.

I was thinking that the path /ui-lovelace-minimalist/Wohnzimmer-mobile is like a path in a directory or folder.

But obviously, the path /lovelace-minimalist-2/Wohnzimmer-mobile is not existing. Neither is the contains any config the path/tile ui-lovelace-minimalist-2

It doesn’t use the folder structure, it uses the name you defined under “dashboards:” in the config, and then the view you defined within that dashboard file.

lovelace:
  mode: storage
  dashboards:
    lovelace-minimalist-2:    <---- this
title: "Wohnzimmer Mobile"
path: "Wohnzimmer-mobile"     <---- and this

If you navigate using the sidebar, you will see the value needed for navigation in the browser’s address bar.

1 Like

Thank you for the explanation.