Skip to content

Support suggested name and icon for dashboards, add to map#51592

Merged
wendevlin merged 8 commits intodevfrom
dashboards-suggested-details
Apr 16, 2026
Merged

Support suggested name and icon for dashboards, add to map#51592
wendevlin merged 8 commits intodevfrom
dashboards-suggested-details

Conversation

@timmo001
Copy link
Copy Markdown
Member

@timmo001 timmo001 commented Apr 16, 2026

Breaking change

Proposed change

Adds support for dashboards to suggest creation details. Currently name and icon are supported. URL is generated as if typed in if title is set.

A dashboard can suggest its own data by adding this function:

  static getCreateSuggestions(
    hass: HomeAssistant
  ): LovelaceDashboardSuggestions {
    return {
      title: hass.localize("panel.map"),
      icon: "mdi:map",
    };
  }

This has been added for the map dashboard.

Also works for custom dashboards.

Also added a helper function to check available paths from the existing set, appends -2, -3 incrementally until one is available. Makes a little more user friendly, when adding multiple of the same dashboard (or one of the same title suggestion)

Screenshots

screenrecording-2026-04-16_11-47-57.mp4
Longer video, before url generation `-2`, `-X` checks
screenrecording-2026-04-16_11-34-29.mp4

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

To help with the load of incoming pull requests:

@timmo001
Copy link
Copy Markdown
Member Author

timmo001 commented Apr 16, 2026

Needs dev docs update

Added to exising docs based on home-assistant/developers.home-assistant#3023 which needs review/merge

home-assistant/developers.home-assistant#3056

@timmo001 timmo001 marked this pull request as ready for review April 16, 2026 10:53
@timmo001 timmo001 changed the title Support suggested name and icon for dashboards Support suggested name and icon for dashboards, add to map Apr 16, 2026
@wendevlin wendevlin merged commit 364c793 into dev Apr 16, 2026
13 checks passed
@wendevlin wendevlin deleted the dashboards-suggested-details branch April 16, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow dashboard strategies to suggest name and icon

2 participants