Replies: 2 comments 23 replies
-
Beta Was this translation helpful? Give feedback.
-
|
@OzGav New thread, started from scratch. This is just providing a good starting point for my issue with bare minimum stuff in the way and I'm going to try your suggestions above in a bit. I have only 1 zone - However the visual layer doesn't toggle itself. The image is definitely not cached and I restarted HA after adding the new file for good measure. I'm using this CSS from the repo as is. - type: custom:floorplan-card
full_height: true
config:
image: /local/floorplan/v2/floorplan.svg
stylesheet: /local/floorplan/v2/floorplan.css
cache: false
log_level: info
console_log_level: info
defaults:
hover_action: hover-info
tap_action: more-info
rules:
- name: Rooms
entities:
- entity: light.shelly_plug
element: light.living_room
tap_action: light.toggle
state_action:
service: floorplan.class_set
service_data: '${entity.state === "on" ? "light-on" : "light-off"}' |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've just started my ha-floorplan journey and I'm having a bit of an issue.
I've created a SVG file in Inkscape, I have areas for each room with the correct ID set.
I also have included the CSS file from one of the examples.
After creating the corresponding YAML, my areas are clickable and they toggle the entities (I'm using binary helpers for testing).
When using Inspect element, the correct areas also change their class to
light_on/light_offrespectively.The issue is that only one of the areas actually changes it's color on click, the others are unresponsive.
See the attached file. The room on the right has 3 parts - top (desks), main (sofa and tv) and bottom (kitchen).
When I click on the kitchen - the class changes and the yellow dissapears. However when I click on the two living room parts, as you can see on the right - the class changes, but there is no change in visuals.
Overview.Home.Assistant.-.Google.Chrome.2023-06-23.09-44-21.mp4
Beta Was this translation helpful? Give feedback.
All reactions