Introduction

Home Assistant is a powerful piece of software, but like all software, it can break with updates. This article details how to fix Home Assistant's most annoying dashboard problem, which affects users with multiple dashboards on multiple devices.

I finally fixed Home Assistant’s most annoying dashboard problem

The Problem

12 release introduced system-wide and user-level default dashboards, which removed the ability to set different defaults for each device. This was a significant issue for users like the author, who needed to manage multiple dashboards across various devices. The community forum provided a promising workaround, but it had several bugs and did not work as expected.

The Solution

The solution involves local storage, which was the key to fixing the issue. The workaround was a custom sidebar panel that added a dropdown of all dashboards, allowing users to choose their default. This approach leveraged Home Assistant's legacy local storage fallback, which is still supported in the current version. The idea was to sidestep the new system-wide default and let each browser remember its own preference.

Troubleshooting

The initial fix had several issues, including stale defaults, dead elements, and a silent dropdown. The author had to hunt down and fix each of these bugs individually. The first issue was a leftover system-wide default that never got cleared, and the second was in the panel's bootstrap code. The ha-select component was rewritten, causing the dropdown to behave differently. Finally, the caching problem was addressed by appending a query string to the module URL.

Implementation

To implement the solution, you need to modify the device-default-dashboard. js file and add a configuration snippet to your Home Assistant configuration. The GitHub repository includes a detailed breakdown of other gotchas you might encounter. For those who prefer, the changes can be installed via HACS.

Conclusion

While this solution is a workaround, it restores the device-specific flexibility that made Home Assistant feel personal. It's a small quality-of-life improvement that addresses a common issue many Home Assistant users face. For those who want to implement the changes, the GitHub repository provides a comprehensive guide and example configuration.

Comments