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!
Given you said you aren’t great with GUIs then I would suggest you draw a to scale floor plan on a piece of paper first. The scan it and then import it into a program to create the SVG. I do it via two steps, I use SweetHome3D to make a PNG of the floor plan then I import that into Inkscape to make the SVG. You should find a number of tutorials on YouTube for SweetHome3D but here is one https://youtu.be/HBXIOj5ndo4
Hi to everybody.
as soon as the new version of Floorplan came up, I intsalled it via HACS.
Since then, even updating both YAML and CSS files I’m not able anymore to change the fill color of the SVG object. I’m able via CSS to modify the visibility and the opacity but noway for the color.
Here is the CSS part:
.light-on {
fill: red !important;
}
.light-off {
fill: white !important;
}
I used the example pkozul put together and tried to put in a simple svc file but my dimensions are off. Below is an example of the card. Any idea what is causing the fixed boundary around the start of my floorplan and why this doesn’t just resize to fill the space?
While creating your SVG, rememeber to fix the “area” of your SVG, to only be the same as your projects elements - else the SVG-file will have a good amount of “empty fill” which are not handled in your browser (cause the SVG have a object with the fixed size). You can share the SVG, if you like to do so. Also, consider to create a discussion at our discussions-area for more feedback related to this. Remember to share YAML, CSS and SVG
Hello, I have always used floorplan and I was able to use only that one because it grouped my entire home and I could easily understand the situation.
I’m stuck at hassio version 0.114 because if I update it the floorplan doesn’t work anymore.
So I went to try to use floorplan in the new version.
One thing that is not clear to me is whether I should completely remove the old floorplan or keep it and add the new ha-floorplan.
Do you clarify me?
The current version of floorplan uses an svg file that shows the status of the lights of its area in black if it is off and in yellow if it is on.
I turn the light on or off by clicking on it.
In the test I have done, on the new plan in the card, when I click on the office, for example, I release the slip but does not execute the command.
Can you help me please?
Thanks, Alberto
Perhaps it is better to start by modifying the home example.
Then I managed to turn on the light bulb that corresponds to my office.
But if I wanted to turn on the background instead of the light bulb what should I do?
How can I tell to color the background rectangle which is in the plant svg file?
I’ve tried a few different ways but am not able to get this working. My question is, is it possible to use a template in the confirmation field of the YAML? I have some lights in bedrooms that I’d like it to confirm for at night but not during the day and was wondering the best way to do that. I figured templating would work well but so far have not been able to get it working.
I’d suggest you to share your existing solution, so we’ve something to help you with. With that said, consider to ask in the “Community” section in our repo. It’s much easier to have sepereated threads, for each help, support and feedback-thread
I’m spending very limited amount of time in this thread, cause it’s hard to get a good overview of what’s waiting, not answered, and so on
Hi @firstof9 From what I can tell, your example should work. The new version supports JavaScript just as the old one did. Is it still not working for you?