Replies: 4 comments 19 replies
-
That is a lot of info. Can you provide one element that isn't working the way you want it to. Please explain what you expect to happen and what is happening. |
Beta Was this translation helpful? Give feedback.
-
Have you looked at my instructions #411?
The meaning of commands in CSS files is explained below. Check if you followed my explanation for the SVG file (naming elements in SVG)! The video that guided you through the creation of your floor plan is so fast and disorganized that you have to watch it carefully several times to understand what it has achieved with the various changes.
Try only one floor first. |
Beta Was this translation helpful? Give feedback.
-
Have you read:Order of elements/objects in SVG(read: https://www.w3.org/Graphics/SVG/WG/wiki/Proposals/z-index)
Setting the background image (default image)!
#background {
display: block !important; //read it: "https://www.w3schools.com/cssref/pr_class_display.php"
z-index: 1; //is top above svg, svg * for 1 layer
} How to set background images to show room images when the light/switch is on!
- entity: switch.sw_st
element: room.sw_st
- entity: switch.sw_vh
element: room.sw_vh
- entity: switch.sw_mi
element: room.sw_mi
- entity: switch.sw_gr
element: room.sw_gr
- entity: switch.sw_ho
element: room.sw_ho
- entity: switch.sw_sp
element: room.sw_sp
- entity: switch.sw_na
element: room.sw_na
- entity: switch.sw_di
element: room.sw_di
- entity: switch.sw_je
element: room.sw_je
- entity: switch.sw_sh
element: room.sw_sh
- entity: switch.sw_ku
element: room.sw_ku
- entity: switch.sw_ko
element: room.sw_ko
- entity: switch.sw_ko
element: room.sw_ko
state_action:
action: call-service
service: floorplan.class_set
service_data: switch-${entity.state}
tap_action:
action: call-service
service: homeassistant.toggle
#rooms image { //default for images of rooms that are illuminated (does not display)
display: none; //does not display any views
mix-blend-mode: lighten; //this setting is important for the overlap between images "https://www.w3schools.com/cssref/pr_mix-blend-mode.php"
animation: 0.75s fade-in linear forwards; //for a nice transition between picture exchanges "https://www.w3schools.com/css/css3_animations.asp"
}
@keyframes fade-in { //animation that makes the image go from opacity 0 (hidden) to opacity 1 (full view) "https://www.w3schools.com/css/css3_animations.asp"
from {
opacity: 0;
}
to {
opacity: 1;
}
}
#rooms image.switch-on { //what happens when the switch/light is turned on, or click on the room
display: block !important; //Shows a image
opacity: 1;; //opacity is not active
z-index: 5 !important; //is top above background for 4 layer
} How to show room boundaries/lines to display when light/switch is on!
- entities:
- switch.sw_st
- switch.sw_vh
- switch.sw_mi
- switch.sw_gr
- switch.sw_ho
- switch.sw_sp
- switch.sw_na
- switch.sw_di
- switch.sw_je
- switch.sw_sh
- switch.sw_ku
- switch.sw_ko
tap_action:
action: call-service
service: homeassistant.toggle
state_action:
action: call-service
service: floorplan.class_set
service_data: switch-${entity.state}
#areas { //it shows nothing/hide
fill: none;
stroke: none;
}
#areas .switch-on {
stroke: red !important;
stroke-width: 15px !important;
stroke-opacity: 1;
z-index: 6; //is top above rooms image.switch-on for 1 layer
} |
Beta Was this translation helpful? Give feedback.
-
See also: #406 |
Beta Was this translation helpful? Give feedback.
-
Ok, hate to ask -- given how many great tutorials are out there... But, I haven't been able to figure out what stupid mistake I'm making that is causing the overlays to not work. There are things that are working... Such as switching between floors, honeycomb menus (options not completely identified - but menus do work), lights turn on/off, outlines show up, default info box shows up as a result of hovering. But, room overlays are totally not getting there. I have been referencing tutorials like:
https://www.youtube.com/watch?v=MCNxgb0mrSA&list=PLNaeA0iHcKdQIfb0TjdS93yqvXJHjTb45&index=7
Home Assistant Floorplan/floorplan-tutorial-theme.yaml
#411
https://www.youtube.com/watch?v=f_3KAPc53hQ&t=388s
But, haven't turned all those reviews into what I'm doing wrong... So, out to the community for some aid. Please see below for the CSS file, the yaml, and the SVG.
Beta Was this translation helpful? Give feedback.
All reactions