Skip to content

Add ability to import views via external URL, making it possible to import via my.home-assistant.io#30308

Draft
maartenla wants to merge 1 commit intohome-assistant:devfrom
maartenla:import-views
Draft

Add ability to import views via external URL, making it possible to import via my.home-assistant.io#30308
maartenla wants to merge 1 commit intohome-assistant:devfrom
maartenla:import-views

Conversation

@maartenla
Copy link
Contributor

Add ability to import views via external URL, making it possible to import views via my.home-assistant.io

Proposed change

This is very much a draft / loose idea, open for discussion.

Currently, sharing dashboard views requires manually copying and pasting YAML — a error-prone process. This PR adds support for importing views directly from an external URL, a good start to be able to integrate with my.home-assistant.io.
With this change, users can share pre-built dashboard views as simple links.

How it works:
A new import handler listens for incoming view payloads from trusted external URLs.
The user is shown a preview/confirmation dialog before anything is applied.
On confirmation, the view is added to the selected dashboard and the user automatically naviges to the edit mode of that view.
The user still needs to fill in all the entities and broken cards.

For the normal user we have the auto filled/suggested dashboards, but I think this would be a welcome addition for the pro users.

Next steps/ideas:
Adding the support to the my.home-assistant.io functionality.
Add a UI that shows which cards / integrations are missing and to automatically add them.

Screenshots

image

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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to backend pull request:

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:

@wendevlin
Copy link
Member

Good idea. It would be cool if we could have blueprint dashboards, where you have to define related entities when you import it

@bramkragten
Copy link
Member

Yes, this is very similar to how blueprints are imported, but the actual blueprint loading is done in core, and not in frontend. I think we should do the same here.

@maartenla
Copy link
Contributor Author

I did base the idea on the blueprints, and I agree that the import should then also go via core.
I quickly built this out to see if anything breaks in the UX, and its not a horrible experience even in this state.

I'll see if I have time to make a poc with a core implementation.

I think that for complex views going to the edit mode with the entities missing is the most understandable way to fill in the entities for the user.
Hints as to what type of entity is suggested or a description could be a part of the blueprint for a view.

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.

3 participants