I try to change svg box with CSS styling based on cover. When I use only one entity (open/close) with same id as svg box it works ok. But I wish to change style of box based on combination of two entities cover.livingroom (open/close) and cover.livingroom_tilt (open/close). I tried all chatGPT suggestions, docs in floorplan webpage… nothing works. Need some help/example. My code is
yaml:
##############
# FLOORPLAN #
##############
- type: "custom:floorplan-card"
full_height: true
config:
image: "/local/floorplan/pritlicje_opt12.svg"
stylesheet: "/local/floorplan/P.css"
# console_log_level: error
# log_level: debug
rules:
- entities:
- cover.livingroom
- cover.kuhinja
- cover.jedilnica
- cover.jedilnica_vrata
- cover.dnevna
- cover.garsonjera
- cover.garsonjera_kopalnica
tap_action:
action: toggle
hold_action:
action: call-service
service: cover.stop_cover
double_tap_action:
action: call-service
service: cover.toggle_cover_tilt
state_action:
action: call-service
service: floorplan.class_set
service_data: cover-${entity.state}
CSS:
/* box cover up*/
.cover-open {
fill: transparent;
stroke: blue;
stroke-width: 2;
opacity: 0.7;
animation: none;
}
/* box cover down*/
.cover-closed {
fill: blue;
stroke: none;
opacity: 0.5;
animation: none;
}
/* i wish to replace with somethin like: */
# /* box cover-tilt*/
# .cover-open-open {
# fill: transparent;
# stroke: blue;
# stroke-width: 2;
# animation: none;
# }
#/* box cover-tilt*/
#.cover-open-closed {
# fill: #9bb0fa;
# stroke: blue;
# stroke-width: 2;
# animation: none;
#}
#/* Box cover-tilt*/
#.cover-closed-open {
# fill: #9bb0fa;
# stroke: blue;
# stroke-width: 2;
# animation: none;
#}
#/* box cover-tilt*/
#.cover-closed-closed {
# fill: blue;
# stroke: blue;
# stroke-width: 2;
# animation: none;
#}
SVG:
<rect id="cover.livingroom" x="1550.9" y="321.45" width="28.991" height="126.22" stroke="#0064ff" stroke-width="1"</rect>