Having issues with my first floor plan #313
martinarva
started this conversation in
General
Replies: 1 comment 1 reply
-
Looks like I solved it, by adding !important to on state. :
I used the CSS sample from here: https://github.com/exetico/Home-Assistant_Attachments-for-YouTube/blob/main/2_1_Create-your-own-floorplan-in-Inkscape-and-ha-floorplan-logics/home_modern.css Might be good idea to add the !important to this file as well. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I made my floorplan and imported it in Inkspace:
![Screenshot 2023-01-01 at 14 54 06](https://user-images.githubusercontent.com/77044330/210171175-11c920fa-f707-44da-8c9a-c7e216d0bdff.png)
Then draw areas and named objects:
![Screenshot 2023-01-01 at 14 56 40](https://user-images.githubusercontent.com/77044330/210171224-c16a05cd-c9bf-4630-a896-8e88f0b1ee0b.png)
With these fill settings. Did not use stroke, as there are some overlaping areas an I did not want lines there. Also used some blur, so overlaping areas would be smooth.
![Screenshot 2023-01-01 at 14 57 50](https://user-images.githubusercontent.com/77044330/210171279-703549bb-2c7b-4ef7-aa8f-8754271f07c0.png)
Here is the svg file:
![first_floor_v6](https://user-images.githubusercontent.com/77044330/210171295-28e57e41-c44f-4755-8b8c-cec746fa7844.svg)
CSS:
`/* All good :/ */
.entitystate-on {
opacity: 0;
}
.entitystate-off {
opacity: 1;
fill: rgb(49, 45, 45) !important;
}`
YAML:
`title: Floorplan
views:
title: First Floor
path: floorplan
panel: true
badges: []
cards:
console_log_level: info
defaults:
hover_action: hover-info
tap_action: more-info
image: /local/floorplan/1st_floor/first_floor_v6.svg
rules:
- element: lights_stairs
entity: light.stair_lights
state_action:
action: call-service
service: floorplan.class_set
service_data: entitystate-${entity.state}
tap_action:
action: call-service
service: homeassistant.toggle
- element: lights_wc
entity: switch.downstairs_wc_mirror_lights
state_action:
action: call-service
service: floorplan.class_set
service_data: entitystate-${entity.state}
tap_action:
action: call-service
service: homeassistant.toggle
- element: lights_kitchen_ceiling
entity: light.kitchen_ceiling_lights
state_action:
action: call-service
service: floorplan.class_set
service_data: entitystate-${entity.state}
tap_action:
action: call-service
service: homeassistant.toggle
- element: lights_kitchen_island
entity: light.kitchen_island_lights
state_action:
action: call-service
service: floorplan.class_set
service_data: entitystate-${entity.state}
tap_action:
action: call-service
service: homeassistant.toggle
- element: lights_sauna_lobby
entity: light.sauna_lobby_lights
state_action:
action: call-service
service: floorplan.class_set
service_data: entitystate-${entity.state}
tap_action:
action: call-service
service: homeassistant.toggle
- element: lights_sauna_washing_room
entity: light.sauna_wahing_room_lights
state_action:
action: call-service
service: floorplan.class_set
service_data: entitystate-${entity.state}
tap_action:
action: call-service
service: homeassistant.toggle
- element: lights_sauna
entity: light.sauna_lights
state_action:
action: call-service
service: floorplan.class_set
service_data: entitystate-${entity.state}
tap_action:
action: call-service
service: homeassistant.toggle
- element: lights_hallway
entity: light.hallway_lights
state_action:
action: call-service
service: floorplan.class_set
service_data: entitystate-${entity.state}
tap_action:
action: call-service
service: homeassistant.toggle
- element: lights_garage
entity: light.garage_lights
state_action:
action: call-service
service: floorplan.class_set
service_data: entitystate-${entity.state}
tap_action:
action: call-service
service: homeassistant.toggle
- element: lights_dining_table
entity: light.dining_table_lights_4
state_action:
action: call-service
service: floorplan.class_set
service_data: entitystate-${entity.state}
tap_action:
action: call-service
service: homeassistant.toggle
- element: lights_living_room
entity: light.living_room_lights
state_action:
action: call-service
service: floorplan.class_set
service_data: entitystate-${entity.state}
tap_action:
action: call-service
service: homeassistant.toggle
stylesheet: /local/floorplan/1st_floor/first_floor.css
type: custom:floorplan-card
full_height: true
`
Light switching works, but i don't get the result where lights on will hide the object.
Lights off result:
![Screenshot 2023-01-01 at 15 02 12](https://user-images.githubusercontent.com/77044330/210171408-fa110719-fe8a-47ae-a9d0-f7028e1ff139.png)
Lights on (marked on the picture) result:
So when lights are on, it's even more darker instead of hiding the object.
Beta Was this translation helpful? Give feedback.
All reactions