Hi. Today (17 oct., 2022) is … a new day for me. Yesterday i planned and recorded a video on how to get started with ha-floorplan. It’s done with Home Assistant OS, which are the easiest way to get started with Home Assistant.
I really hope that I’ll find time to create more videos in the future, with more specific content - but I’ve received quite a few requests on how to get started with Home Assistant, in the last couple of years.
Happy floorplanning everyone!
It’s my first video in English and as a “teacher”, but I’ve executed it the best I can, during a rainy sunday.
There’s many ways of adding the Floorplan. I’ve spinned up my Hass.io test-instance, and create a guide for you
I’ll like to mention, that it’s totally OK that you’re asking. It’s helping us to know, what we need to include in our docs, for a “Beginners” guide ! That’s great.
Guide for Hass.io setup (where static-files will be located within config/www)
Please note that this is ONLY FOR the Hass.io solution!
Note about non-hass-io solution: Static-files for non-hassio setups, are normally within your .homeassistant/www (.homeassistant are the same folder, as where your configuration.yaml file lives.)
Replace the Floorplan-content with the following code (open the link, and copy it): Note that “type” are missing in our docs (I’ve created a note about that, so we’ll remember to have it 100% copy-paste friendly).
I’ve just added it as the viewst view, so here it looks like this:
If you’re unsure about how to transfer files to your Hass.io instance, I’ll recommend you to use the “File editor” add-on from the “Supervisor” section.
IMPORTANT: If you created the “www” folder yourself, you’ll need to restart Home Assistant before continue. If you’re unsure whether the “www” folder was created with config from the beginning, please restart Home Assistant - just to be sure.
Hello @exetico and @pkozul
I’m back trying to apply the first rules on a floorplan I’ve converted from Autocad. Seems its not working. The main difference I’m trying to apply the rules to a GROUP of converted polylines that forms a door. Could it be the problem? HAving it grouped and setting it with correct ID, the color change is not applied. If I apply it to a single rectangle created by me, it works.
Ideas?
Thanks!
Simon
Could you please wrap-up the problem, and secure that you’re using ha-floorplan?
Examples can be found here (select them in the menu in the left sidebar). The light-build should do the RGB just fine. @pkozul has already tested it
Also, remember that a few keys/options has been renamed:
I’m not 100% sure about, what you’re thinking off, when you’re writing:
Are nothing triggered, if you’re pressing a element on the SVG-file, or?
Personally I’ve create some ID’s in the SVG file, and are poing to them. They’re not a 100% match - cause I knowit will change in Home Assistant, down the line.
Here’s one example with my living-room:
name: Livingroom
entities:
- group.livingroom
element: area.livingroom
# groups: # Can be used to open group
# - group.office
tap_action:
service: light.toggle
service_data:
entity_id: light.aeotec_zw111_nano_dimmer_level
state_action:
service: floorplan.class_set
service_data:
class: '${(entity.state === "on") ? "light-on" : "light-off"}'
Here area.livingroomare the “ID” given in the SVG-file to the livingroom-svg element. The group.livingroom are used to see, if one (or more) light are on, and if they are, it will add the state called light-on. If i press the element mathing the ID (area.livingroom), it will trigger my light entity called light.aeotec_zw111_nano_dimmer_level.
I hope that can help you a bit? I know the docs are not ready for the public, but we’re trying to do our best to make everything ready, as fast as possible
Sorry @exetico I’ve not explained enough.
My first tests were on a SVG with simple rectangles or cicrles drawn by me. Then, after your help, I was able to test a lightbulb, a motion sensor and a contact door. As soon the sensor changes, the related item, identified by the ID, changes his color, good.
The next step was to take my Home DWG, convert it with a tool into SVG and try to apply these tests on my home plan. Here I would like to select my converted home door and give them the contact.sensor ID, but I’ve noticed that the item is in really a group composed by different items:
So applying the ID to a group of items, seems not to work, is that posible?
Or as alternative, I could redraw the door with a single rectangle, no problem, but how in case to switch between a green open door and a red closed door? Another problem is the on-mouse-over area of the door is small. Better would be that the whole entrance is on-hoverso that the mouse could show informations on the whole area, so that if the door is closed or open, in the same place the information is available. Soggestions / examples to follow? Thanks!
Hello, back again @exetico and @pkozul . Forget the previous post, even if interested why it’s not working.
I’m redrawing the door, so no problem to match the item into svg, so the same time I’m trying to apply a rotate effect. I’ve taken some examples from the forum as well from your site, but the door changes on-hover state, but not animating, neither changes color. Ideas?
Apologies if this is answered elsewhere–I’ve looked, but I may have missed it. Does anyone have a suggestion for generating the SVG based on measurements? I’m terrible with GUIs but have decently accurate measurements for our house, and would like to turn that into a floorplan as directly and precisely as possible. Thanks for any suggestions!
Magicplan has an “import and draw” feature where you can basically scan and trace an existing plan. I’ve been using the app for my floorplan but I haven’t used this feature so can’t tell you more than that.
Just pointing back at my post a few up: generating the initial SVG floorplan has been the thing blocking me for many months. I think once I have that the rest won’t be nearly as unfamiliar and challenging. (I just revisited the project when I saw it pop up on HACS. Nice!) Thanks!