Restore device-specific default dashboard

In 2025.12 release devs gave us all a Christmas present of a system-wide default dashboards with an ability to override it on user level.
While the intent is understandably good and is a welcomed change for simple installations, it came with annoying side-effect of lost ability to specify default dashboards on per device-level.
The proposed workaround to create separate user for each device sounds like nonsense, so I put some effort to figure out if anything can be done to get device-specific dashboard selection back.
Fortunately, looking at the code, I was able to identify pretty simple way to do this.

Limitation:

  1. Enabling this functionality effectively disables system-wide/user-overriden default dashboards: system starts behaving like it was in v2025.11 and earlier.
  2. Only user-created dashboards can currently be selected as device’s default dashboards.

Steps:

  1. Under /www folder create dasboard folder
  2. In /www/dashboard folder create device-default-dashboard.js file with following content:
const LitElement = Object.getPrototypeOf(customElements.get("ha-panel-lovelace"));
const html = LitElement.prototype.html;
const css = LitElement.prototype.css;

class DeviceDefaultPanel extends LitElement {
  static get properties() {
    return {
      hass: { type: Object },
      narrow: { type: Boolean },
      route: { type: Object },
      panel: { type: Object },
    };
  }

  firstUpdated(changedProps) {
    super.firstUpdated(changedProps);
    this._getDashboards();
  }

  async _getDashboards() {
    this._dashboards = await this.hass.callWS({
        type: "lovelace/dashboards/list"
    });
    this.requestUpdate();
  }

  async _dashboardChanged(ev) {
    const urlPath = ev.target.value;
    console.info("selected", urlPath);
    window.localStorage.setItem("defaultPanel", JSON.stringify(urlPath));

    await this.hass.connection.sendMessagePromise ({
        type: "frontend/set_user_data",
        key: "core",
        value: {
            ...this.hass.userData,
            default_panel: undefined,
        }
    });

    await this.hass.connection.sendMessagePromise({
        type: "frontend/set_system_data",
        key: "core",
        value: {
            ...this.hass.systemData,
            default_panel: undefined,
        }
    });
  }  

  render() {
    var val = "";
    try {
      var val = JSON.parse(window.localStorage.getItem("defaultPanel"));
    } catch {}

    return html`
      <div>
        Select dashboard:
        <div>${this._dashboards
          ? html`
              <ha-select
                .label='Dashboard'
                .value=${val}
                @selected=${this._dashboardChanged}
                naturalMenuWidth
              >
                ${this._dashboards.length
                  ? html`
                      ${this._dashboards.map((dashboard) => {
                        return html`
                          <ha-list-item
                            .value=${dashboard.url_path}
                            graphic="icon"
                          >
                            <ha-icon
                              slot="graphic"
                              .icon=${dashboard.icon || "mdi:view-dashboard"}
                            ></ha-icon>
                            ${dashboard.title}
                          </ha-list-item>
                        `;
                      })}
                    `
                  : nothing}
              </ha-select>
            `
          : html`<div class="loading">
              <ha-spinner size="small"></ha-spinner>
            </div>`}<div>
        <pre><button onclick="history.back()">Back</button></pre>
      </div>
    `;
  }

  static get styles() {
    return css`
      :host {
        padding: 16px;
        display: block;
      }
    `;
  }
}
customElements.define("device-default-dashboard", DeviceDefaultPanel);
  1. if not added, add panel_custom: section to configuration.yaml
  2. Add following under panel_custom: section:
  - name: device-default-dashboard
    sidebar_title: Set Device Dashboard
    sidebar_icon: mdi:devices
    module_url: /local/dashboard/device-default-dashboard.js

  1. Restart HA

Now you should see new entry on the left:
image
When selected, it will show drop-down with list of user-created dashboards:


Selecting value from the list will:

  1. Disable system-wide/user-overriden default dashboards functionality
  2. Set selected dashboard as default dashboard for the current device.

Note: after you done with all devices, you can hide “Set Device Dashboard” entry via Profile>User Settings>Change the order and hide items from the sidebar.

10 Likes

Or this will do too. :smile:

This is probably the better anyway since it’s unlikely that a PR to fix the code in the official channels would be accepted. it would likely have just been at best ignored or at worst denied.

this way the users get to pick which way they want to go. which is what should have been done in the first place.

2 external imports, with additional imports/export on a remote server 
 That feels somehow cumbersome and fragile to me

It first sounded like a good idea, but That gave me second thoughts

Does above look familiar? Just took an example from HA official docs as a starting point.

Obviously, it would be much-much better to be able to write something like our nobles are doing in HA code, like:

import { css, html, LitElement, nothing } from "lit";

But, alas:

Any suggestions?

@finity, sorry it was an answer to boheme61.

True , and im also aware that various Custom-Cards and Integrations uses external .js sources, which ofcause is kind of a “breaking deal” if your External connection is down

No i have no better ideas , unless all dependencies could run in a separate container, locally

And again it is a useful feature and nice quick work you’ve done

Hope this is temporary workaround till devs decide to address the gap.
But as a wise man once said: “Nothing is more permanent than the temporary” :slight_smile:

1 Like

And while they are on it, make Theme(Themes approved/added by Admin) and side-panel-features a user-profile setting(Loaded at login 
 anywhere!, and are not flushed every dam time
Hopefully this comes as first priority

1 Like

Ok. Got rid of external dependencies as per this approach. Updated code in first post.

@boheme61, thanks for bringing this up!

3 Likes

Hi,

Some typo : in point 1 : dasboards

I tried to install this following your instructions but ‘dashboards’ seems wrong , the script looks in ‘local/dashboard’
When I change the folder name to ‘dashboard’ , the script runs but is unable to load custom panel.
I’m stuck.

Any idea?

What do you mean by “the script runs but is unable to load custom panel”?

Note: I fixed 1st post to have consistent “dashboard” name for folder.

#1: any errors in DEV console?
#2: what happens when trying to access that url directly? http://192.168.3.251:8124/local/dashboard/device-default-dashboard.js

1: not on my laptop now , answer tomorrow
2 : It opens the js, I see the source code

Done nothing in between and today , it suddenly worked


Thanks for this @Forsaken - working well for me.

I get the logic from devs, but this was an annoying change. I don’t want to create and admin multiple user accounts, I just want me and my multiple devices doing their thing! :joy:

1 Like

Thanks for creating this. It works well!

One caveat - I want my default dashboard to be at the top of the left sidebar. But since the HA 2025-12 update, changes to the sidebar are reflected across different devices tied to the same user. So while I can set a default dashboard for different devices, it seems I have to pick one dashboard to be at the top of the menu across all devices. This also means I can’t hide dashboards I won’t ever use on a specific device, because it will hide the dashboard across all devices.

@ElGuano, yep, I know. Depending on how desperately you want it back, you can start with reviewing this commit to see if anything can be done here: Save default panel at user and system level (#27899) · home-assistant/frontend@1ac3cf1 · GitHub :slightly_smiling_face:.

I’m installing this now, hope it helps, but just noticed post #1, Step #1, still shows “dasboard” instead of “dashboard”.

1. Under **/www** folder create **dasboard** folder

In case you didn’t notice: It’s a community guide, so anybody can edit it.