Skip to content

FEAT: Add FloorplanCardEditor component and integrate with FloorplanCard#634

Open
MrBearPresident wants to merge 2 commits into
ExperienceLovelace:masterfrom
MrBearPresident:master
Open

FEAT: Add FloorplanCardEditor component and integrate with FloorplanCard#634
MrBearPresident wants to merge 2 commits into
ExperienceLovelace:masterfrom
MrBearPresident:master

Conversation

@MrBearPresident
Copy link
Copy Markdown
Contributor

Proposed change

This PR adds a visual editor that still heavily leans on yaml but makes it easier to be organised.

Type of change

  • 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

Example configuration

see examples

Example printscreens/gif

Card selectable when adding a card
Schermafbeelding 2026-04-30 225806

A default card is created, without rules
Schermafbeelding 2026-04-30 225819

The example card from the documentation, with one extra unnamed rule.
Schermafbeelding 2026-04-30 225938

Image settings
Schermafbeelding 2026-04-30 225843
Default action settings and the rule editor
Schermafbeelding 2026-04-30 225909

Additional information

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

Additional documentation needed.

Let discus what is needed first.

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests screenshots/gifs have been added to verify that the new code works.

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

  • Documentation added/updated for readme.

Co-authored-by: Copilot <copilot@github.com>
@MrBearPresident
Copy link
Copy Markdown
Contributor Author

Hey @exetico Would you have some feedback.
Things that are missing?

…te YAML help texts, and improve code structure

Change ha-textfield to ha-input
@exetico
Copy link
Copy Markdown
Member

exetico commented May 23, 2026

Hi,

Could you please let me know, if this is primary done by AI? It does say a bit about the quality, before I'm digging into the code. I really like the idea, and actually had something on my own todo-list, so thank you for doing this. With that said, it's primary limited to it's own file, so I'm not that worried about the changes :-)

Have you checked if it's possible to unit-test those things? I've not checked the docs, regarding the editor.


I actually have a few AI branches, too, just to make some house-keeping, which I'd like to review first and merge, if they look ok;
master...copilot/implement-four-issues-separately (PR: #633)
Above mentioned branches are now merged as part of 1.1.6, after review. I did find a bit of time, to get those through.

@exetico
Copy link
Copy Markdown
Member

exetico commented May 23, 2026

We'd need to check if https://raw.githubusercontent.com/ExperienceLovelace/ha-floorplan/ccbf6a5afeffca6c185f3bf5dffaa2e8a53a5155/docs/_docs/floorplan/examples/floorplanner_home/floorplanner_home.svg is available as part of the unit-testing of the editor, I guess.
(But pulling things online in a unit-test, is not a thing I'd like, instead, check if the file exists in the repo)

Same goes for the background image, if that's in use.

So units tests of;

  • Basic unit test of the editor (if that's a thing, I've not read the HA-docs related to the YAML editor solutions, maybe Bubble Card or similar does have some inspiration, but please follow the current way unit testing are implemented in ha-floorplan)
  • Unit testing of ressources used in the editor (svg file + bg(?)), and make it clear, why those things are tested, so it's easy to understand that, once we break that in two years, and forgot all about the editor using it.

@MrBearPresident
Copy link
Copy Markdown
Contributor Author

Could you please let me know, if this is primary done by AI? It does say a bit about the quality, before I'm digging into the code. I really like the idea, and actually had something on my own todo-list, so thank you for doing this.

So its written primarly by me but supported by AI.
For example I give an example of how the code for every rule should look like and then asked make it so that every code gets shown through a function.

With that said, it's primary limited to it's own file, so I'm not that worried about the changes :-)

I also wanted this. Makes it very clear what the problems are.

Basic unit test of the editor (if that's a thing, I've not read the HA-docs related to the YAML editor solutions, maybe Bubble Card or similar does have some inspiration, but please follow the current way unit testing are implemented in ha-floorplan)

I know for sure bubble cards doesn't uses unit test because I helped Cloos a while on the editor side.
I will need some time to look into this. I'm in the middle of moving (hence the reason why I'm redoing my dashboard and wanted some structure in the massive file i'm creating), so this can take some time before I pick this up again.

Unit testing of ressources used in the editor (svg file + bg(?)), and make it clear, why those things are tested, so it's easy to understand that, once we break that in two years, and forgot all about the editor using it.

Also will need to check how we could do this. But for same reason as above it will take some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants