frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Add Blueprint Editor

Open jpitlor opened this issue 5 months ago • 2 comments

Proposed change

I wanted to add an editor for Blueprints, similar to Automations and Scripts. Essentially, this creates a page that has an editor for blueprintObject.metadata.input, then embeds the existing automation/script editor.

There was a WTH forum post asking for this. I'm not sure if there were any formal feature requests/roadmap plans, but truthfully this is mostly inspired by my own desire for this feature to exist.

Type of change

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

Example configuration

I don't think any particular configuration is needed to test this, especially since HA comes with a couple blueprints out of the box.

Additional information

  • This PR fixes or closes issue: N/A
  • This PR is related to issue or discussion: https://community.home-assistant.io/t/wth-cant-we-create-or-edit-blueprints-with-the-ui/469776/5
  • Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/39316
  • Link to core pull request: https://github.com/home-assistant/core/pull/145863

Additionally, I have concerns about the size of this MR. I think it's quite large. If it should be broken up, I'd love to do that. I just need guidance on the best strategy. However, there are parts of this feature I left out explicitly because of the size:

  • a /show route
  • Adding support for !inputs in visual selectors
  • ~~Selector Configuration~~ Implemented, thanks to feedback from karwosts!
  • Validation/testing (of the blueprints, not the code)

Checklist

  • [x] The code change is tested and works locally.
  • [x] There is no commented out code in this PR.
  • [ ] Tests have been added to verify that the new code works. I did not do this because it doesn't seem like there's a way to test UI components. At least, I didn't see anything in the test directory. Let me know if there's something I can look at!

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

jpitlor avatar May 29 '25 19:05 jpitlor