hello
I am new at floorplan and I read some document about floorplan ,I download Inkscape but is not look like the best program to build svg file .
can some one advice me what is the pro program that give me good UI and graphic ?
I try to convert it to css using Inkscape
this is the error I get and no file css made
Traceback (most recent call last):
File âmerge_styles.pyâ, line 133, in
e.affect()
File âinkex.pyâ, line 283, in affect
self.effect()
File âmerge_styles.pyâ, line 116, in effect
raise KeyError(âThere are no common styles between these elements.â)
KeyError: âThere are no common styles between these elements.â
I am new to floorplan as well. What I did was follow the instructions on the github to get the example floorplan working first. This includes downloading the example files and placing them in the right folders on your home assitant device. Youâll have to download the svg, yaml and css files from there for the example.
Once you get this working, then you can try to make your own. I read the âshare your floorplanâ thread and learned from there by looking at other peopleâs floorplans and how they did it.
I used inkscape and it was pretty good. If you have an image of your floorplan, import that and then make a layer called âwallsâ and draw your walls over the image. I also have a layer for doors and windows, furniture, floors, icons, etc.
There are multiple files you need to download from github, there is a css file there so you donât need to make one yourself. Download it and edit it.
You need to edit the floorplan.yaml and add you switches, then edit the floorplan.css to change the colours etc.
See here âŚ
Look at the lights and switches partsâŚ
Switches
Below is an example of a 'Switches' group, showing how to add switches to your floorplan. The appearance of each switch is styled using the appropriate CSS class, based on its current state.
- name: Switches
entities:
- switch.doorbell
states:
- state: 'on'
class: 'doorbell-on'
- state: 'off'
class: 'doorbell-off'
action:
domain: switch
service: toggle
Lights
Below is an example of a 'Lights' group, showing how to add lights to your floorplan. The appearance of each light is styled using the appropriate CSS class, based on its current state.
- name: Lights
entities:
- light.hallway
- light.living_room
- light.patio
states:
- state: 'on'
class: 'light-on'
- state: 'off'
class: 'light-off'
In the .css file change and add your own classes for other switches etc.
Download any svg icon and import it into inkscape and resize/reposition it, add the entity_id and hit set then save the floorplan.svg and bobs ur uncle