I’m excited about using Floorplan and invested a lot of time modeling my house. I’m stuck at the beginning of setup, though. I’m running HA with HACS installed on Docker. I don’t have supervisor access.
I access files in the www folder with /local and I have a folder labeled “Community” instead of HACS, so I replaced the template’s path with /local/community/ha-floorplan/examples/home/home.svg in YAML file.
Two errors are generated, one for the URL and the other for the stylesheet. The URL does appear to be loaded, though. I’d appreciate some/any guidance. Thanks!
Yes it looks like a path problem. You could post a picture of your directory structure? Also put the path of the style sheet or SVG directly in your browser and they will appear if you have the path correct.
If you have some weird double mapping problem going on then move the examples directory up under www. It doesn’t need to be in the same place as the floorplan.js file
Edit: actually I would remove the vertical stack and horizontal stack from your configuration as that is just complicating things at this point
Does custom: floorplan-card correctly scale text like climate cards when viewing in Mobile app?
In my case I used picture-elements for outputting floorplan house map and encountered bad scaling of text elements from different sensors when viewing on Mobile app (the text is too bulky there, especially if the mobile is in portrait mode)
I am loading floor plan in secondary dashboard (panel: true). When I return to the Overview dashboard, I get invalid entity id warning. When I refresh the screen, it disappeared. It will return back after switching to floor plan and returning back. Any idea why?
Hi ! How do you set this card to display stroke color basing on browser mode : dark or light ? I tried CSS with @medial tag but it does not work. Could you pls clarify this?
@media (prefers-color-scheme: dark) {
element {stroke: white;}
}
@media (prefers-color-scheme: light) {
element {stroke:black;}
}
@OzGav , Thanks for prompt reply.
For some reason my browser (Firefox) does not catch this @media scheme property correctly but try to use only first one - dark - always… so, the stroke value is always ‘white’ …
But on top of that I attempted to replace ‘stroke’ value another way and this does not let me do it because the ‘stroke’ property is part of path styling of original SVG.
For instance, I have in my CSS file: #layer1 .element {stroke; web-kit-stroke} defined , You can see below . but the stroke is omitted since it is part of tag styling.
Shall I configure Inkscape to set ‘stroke: inherit’ somehow for all elements ???
Is there any extra steps (combine elements styling) to create proper SVG to make it work for floorplan in dark/light modes properly?
Seems I understood why prefers-color-scheme selects ‘dark’ always - the reason this is a preference set in my browser settings and it is not the theme setting of HA frontend. If I change the firefox theme - it follows well. But no reaction after HA UI preferences ((
The only working way so far is to take stroke color from the ‘var(–primary-text-color)’ .
In Inkscape if for a group of elements there is a user defined class and this class has ‘stroke’ attribute defined then similar stoke attribute is removed from styling of those elements. it is possible to define
myclass {stroke:var(--primary-text-color)}
it will correctly work in dark/light mode but only as black or white…
Hope you’re well. Spent hours and hours and hours following a tutorial here (Home Assistant Floorplan SVG Inkscape - YouTube ) but still seem stuck. My svg loads onto the screen, but there is this error message at the bottom.
Currently I have stripped out as much as possible to try get a basic solution working. Here’s the YAML
Let me know if you’re still struggling. If more help is needed, you could also consider to create a dedicated discussion here:
There’s plenty of other “starter”-related question, if you’re searching for inspiration . I’ve also considered to create a video, with all the basic steps, but I’m still struggling to find time to do that.
So I have a thing I want to try but I don’t know if it’s possible. I have a svg with a layout where I want to dynamically add (or copy or …) svg elements. The positions of the elements I can get from a sensor. Would this be possible dynamically add or remove elements and set there position (change the css or something like that)