Can´t get new dashboard to work

Hi, I have been reading the doc about this topic and, don´t know what I am doing wrong here, could you please give a hand?

I have created a ui-lovelace.yaml file inside config folder

put this code, copied from the manual, inside it

lovelace:
  mode: storage
  # Add yaml dashboards
  dashboards:
    lovelace-yaml:
      mode: yaml
      title: YAML
      icon: mdi:script
      show_in_sidebar: true
      filename: dashboards.yaml

then I created under lovelace folder the file dashboards.yaml

and placed the example code inside it

views:
    # View tab title.
  - title: Example
    cards:
        # The markdown card will render markdown text.
      - type: markdown
        title: Dashboard
        content: >
          Welcome to your **dashboard**.

would you please give some advice on this?

Doing this from github code & memory, but hopefully this will work.

In the config directory, you should have a lovelace.yaml file. In here you can define the location of any dashboard you create.

resources: !include lovelace/resources.yaml

dashboards:
  ui_lovelace_mobile:
    mode: yaml
    title: Mobile
    icon: mdi:phone
    show_in_sidebar: true
    require_admin: true
    filename: lovelace/ui_lovelace_mobile/dashboard/ui-lovelace-mobile.yaml

Under the 'config > lovelace' directory create a new directory for the dashboard defined above. In there you should create a folder called ‘dashboard’.

In the dashboard directory put the yaml file that defines the dashboard - in this case ‘ui-lovelace-mobile.yaml’.

Inside the ui-lovelace-mobile.yaml you can define the pages, title, icons etc etc

---
# Button cards location
button_card_templates: !include_dir_merge_named "../../../custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/"

title: "Mobile"
theme: "minimalist-mobile"
background: "var(--background-image)"

views:
- !include views/view-overview.yaml
- !include views/view-lights.yaml
- !include views/view-lounge.yaml
- !include views/view-security.yaml
- !include views/view-heating.yaml
- !include views/view-things.yaml

I used a sub-directory under the dashboard called views and have each page of my dashboard as a single yaml file. Easier to edit and keep stuff together.

Screenshot 2024-09-30 at 12.42.00

The file will also need to specify where the UI-Minimalist custom cards templates are.

Not sure if that helps.

N

Edit: Formatting

1 Like

Sorry I didnt stated that I want to keep my actaul dashboard in GUI, but the new one in yaml mode.

About your answer, well, the new dashboard appears in the side panel, and seems to work but it shows my actual overview dashboard contents.

Sorry - not much more I can say. I dropped UI-Minimalist for Mushroom TBH.

Originally I had a web/tablet dashboard that ran in the config/ui_lovelace_minimalist folder that got setup by default when it was installed - over-writing the one it created. I added a new mobile dashboard based on the stuff above later.

With the new sections capabilities, I’ve removed both and just use Mushroom cards and sections via the UI to achieve the same results.

UPDATE:

I think that showing the Overview dashboard means it can’t find the actual yaml files for the dashboard, so it’s falling back to the default view. Check your paths/spelling perhaps?

don´t know what is happening, moved around the yaml file up and down through the folder tree inside lovelace folder, but nothing changes

As such, the file should reside in /config.
If you put it inside lovelace, it should be

filename: lovelace/dashboards.yaml

Don’t forget to restart HA after each chnage to configuration.yaml

hi, i`ll try; one question

qhy are you saying to restart after changing configuration.yaml?

I am saying that because I didn´t touch configuration.yaml but ui-lovelace.yaml.

Well, if you change configuration.yaml to specify the correct path, for instance

Ah, no. The lovelace: et al goes into configuration.yaml, not ui-lovelace.yaml

Just remove ui-lovelace.yaml and paste this to configuration.yaml and restart, if the dashboards.yaml in lovelace folder, then filename lovelace/dasboards.yaml


lovelace:
  mode: storage
  # Add yaml dashboards
  dashboards:
    lovelace-yaml:
      mode: yaml
      title: YAML
      icon: mdi:script
      show_in_sidebar: true
      filename: dashboards.yaml

2 Likes

that did the trick, thank you very much