🗺️ VectorPlan
Interactive floorplans for Home Assistant can be a huge task for anyone new to the scene. Well, this app is a friendly visual editor that makes the whole process a bit more easier!
It will generate YAML, CSS, or SVG code for you. Just drop in your floorplan picture, drag and drop your items (like lights and fans), trace your rooms, and wow! It generates the exact code you need for the Home Assistant custom:floorplan-card. Piece of cake!
Live Demo: https://zoft123.github.io/VectorPlan/
-
Drag and Drop: Just click and move your smart home devices right where you want them.
-
Room Lighting: Trace a room, and when you turn on a light, the app creates the CSS to light up that exact spot. It looks amazing!
-
Live Sync: Securely connect it to your Home Assistant with a Long-Lived Access Token, and it pulls all your real Entity IDs for you.
-
Custom SVGs: Do you want to use your own icons for fans or lights? Go right ahead!
-
One-Click Code: Click a single button to grab all your YAML, SVG, and CSS, ready to copy and paste.
-
Docker Friendly: You can get it running on your server in just a few seconds.
You can either run this using Docker (which is probably the best way for most people) or start up the development server if you feel like tinkering with the code.
Do you have Docker installed? Great!
-
Clone the project:
git clone https://github.com/Zoft123/VectorPlan.git cd VectorPlan -
Fire it up:
docker-compose up -d --build -
Open up
http://localhost:8080in your web browser, and you are all set!
If you want to add features or change the interface, you will need Node.js (v18 or higher).
-
Clone and enter the folder:
git clone https://github.com/Zoft123/VectorPlan.git cd VectorPlan -
Install the required packages:
npm install -
Start the development server:
npm run dev -
Check your terminal for the local link (it is usually
http://localhost:5173).
So, you finished your map. What is next?
-
Click that Generate Code button in the top right corner.
-
SVG: Copy the SVG code and save it as
floorplan_generated.svgin your Home Assistant/www/floorplan/folder. -
CSS: Do the exact same thing for the CSS, saving it as
floorplan_generated.cssin that same spot. -
YAML: Create a "Custom: Floorplan" card on your Home Assistant dashboard and paste in the YAML code. Just double-check that the file paths match where you saved everything!
Do you have an idea for new icons? Would you like to improve the CSS or add new features? Yes, please! Just fork the project and send over a Pull Request.
-
Fork the project
-
Make a branch (
git checkout -b feature/CoolThing) -
Commit your changes (
git commit -m 'Added a cool thing') -
Push to your branch (
git push origin feature/CoolThing) -
Open a Pull Request so we can see it!
This project is licensed under the GNU General Public License (GPL). Check out the LICENSE file for details.
This project is almost entirely vibe-coded. It's not claiming to be anything else other than that.