The example files can be found here:
Thanks a lot!!
And you might even like to use the on / off light bulb SVGs we have in the Home example
Thanks for your help but I have not much time and I am facing some problems that does not allow me to get the floorplan visible
I will wait till the final release and documentation is ready to try it again without bothering you
Hi Oscar
ha-floorplan will not see any changes in the structure, so fell free to give it another try. If you’re facing any issues, please share your current configs including whatever else needed.
I’ve merged my own setup, and that’s working just fine, after changing the most primary ‘keys’:
Since the old floorplan I did not update anything so, I am sure that I am missing something in the configuration, not an issue in your implementation for sure
If I had more time to check it, I probably would get it working but for me it is impossible to expend more time, sorry. Anyway, thanks for your support and your willingness to help the community, I really appreciate it
Hope after holidays I will be able to find more time to check it, though the official release will be available.
Thanks again for your work
at https://github.com/ExperienceLovelace/lovelace-floorplan it says:
Just add the URI to HACS’s as custom repository.
but i get a Invalid Add-on repository! so what is the URI to use?
Hi.
It’s currently a bit of a mess, while we’re moving to the new repo.
Please see:
Also, take a look at examples (use left-side menu), or the buttons in the bottom of the page:
i tried with https://github.com/ExperienceLovelace/ha-floorplan
that did not work either
So i guess i have to wait
Well, it’s working just fine here. See screenshots below.
Select Lovelace
as the category while adding it as a custom repo. I’ve just tested it again, and it’s working just fine
(We’ve already submitted the PR to HACS, but waiting for them to handle the request. It’s totally ready to be used as a custom repo already)
its this part:
So, plese remove the old repo from HACS, and replace it with with custom repo:
https://github.com/ExperienceLovelace/ha-floorplan
That’s not HACS. You’re in HA’s own store for the Hass.io solution.
Please add HACS to your HA env. …
Check this:
In HACS, you’ll find a lot of other great plugins, components, and much more
so i got as far as installing the card?
but how do i add the card to home view? it does not show up as a card there
Now you’ll need to add the resource, to your resource file
I can already see a Floorplan in the background. Are that just a image, or is that your SVG file?
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.)
Hass.io setup guide
At this point, you’ve already installed HACS, and added the ha-floorplan repo as a custom reposition, and installed it, too
Let’s take the last steps together…
- Please validate that the resources is added in
http://{HA-IP}:8123/config/lovelace/resources
Attention: You’d have to enable “Advanced mode” on your Home Assistant user-account. Read more here.
-
Create a new view:
-
Go to the “raw” editor:
-
Scroll down, and find “Floorplan”
-
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:
-
Now you’ll be able to see an empty card, if your CSS and SVG-files are missing:
-
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.
After it’s installed, open the Web UI. -
You can see that the defined path are
/local/floorplan/examples/home/home.svg
, for the svg-file./local/
translates into/www/
:
-
Let’s create the folders needed. Note that
/
will be used to create a folder, within a folder path (that’s a default thing on most Unix-systems).
-
Navigate to floorplan > examples > home
-
Upload the “home.svg” and “home.css” file to the folder, with the “Upload file” button.
-
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. -
Enjoy Floorplan
Oh well… You’ll need to draw a svg yourself, ofc.
Bonus-info: You can remove the console by removing the log_level: info
-line from the config.
Also… It’s totally possible to use the GUI for almost every step, if you like to do so.
-
Use the “+” button, after you’re created the “Floorplan” view:
-
Press “Manual”
-
Paste in this wall of code (open the link, and copy it):
that is just an image… its a thing i found that was installed from the beginning
thanks for the guide, it worked for me, but a restart was needed
now on to making an SVG
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.livingroom
are 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
It seems I am having difficulty converting a template if you don’t mind helping:
state_action:
action: call-service
service: floorplan.image_set
service_data: |
>
var imageName = '';
switch (entity.state) {
case 'sunny': imageName ='day'; break;
case 'clear-night': imageName = 'night'; break;
case 'partlycloudy': imageName = 'cloudy-day-1'; break;
case 'partly-cloudy-night': imageName = 'cloudy-night-1'; break;
case 'cloudy': imageName = 'cloudy'; break;
case 'rain': imageName = 'rainy-1'; break;
case 'snow': imageName = 'snowy-1'; break;
}
return 'image: /local/floorplan/active/weather_icons/' + imageName + '.svg';
Does the switch function no longer work?
Thanks.