Hello!
I managed to get the floorplan working. But I ran into a problem where the touch targets look OK on a smaller screen but they are shifted when viewing on a larger screen.
Here is what it looks like either in the edit mode or on small screens:
and here are where the targets move to on larger screens or when not in card edit mode.
They are all shifted to the top and left of where they should be. Any ideas on how to fix it would be greatly appreciated!
Here is my panel code:
# State images
type: picture-elements
image: /local/floorplan/1080px/no_lights_3d_home.png
elements:
- type: image
entity: light.bathroom_vanity_lights
tap_action: none
hold_action: none
state_image:
'on': /local/floorplan/1080px/bathroom_vanity_mask.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square_red.png
style:
top: 50%
left: 50%
width: 100%
- type: image
entity: light.bedroom_nightstand_lights
tap_action: none
hold_action: none
state_image:
'on': /local/floorplan/1080px/bedroom_nightstand_mask.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square_red.png
style:
top: 50%
left: 50%
width: 100%
- type: image
entity: light.deck_light
tap_action: none
hold_action: none
state_image:
'on': /local/floorplan/1080px/deck_mask.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square_red.png
style:
top: 50%
left: 50%
width: 100%
- type: image
entity: light.dining_room_main_lights
tap_action: none
hold_action: none
state_image:
'on': /local/floorplan/1080px/dining_room_mask.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square_red.png
style:
top: 50%
left: 50%
width: 100%
- type: image
entity: light.kitchen_counter
tap_action: none
hold_action: none
state_image:
'on': /local/floorplan/1080px/kitchen_counter_mask1.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square_red.png
style:
top: 50%
left: 50%
width: 100%
- type: image
entity: light.living_room_main_lights
tap_action: none
hold_action: none
state_image:
'on': /local/floorplan/1080px/livingroom_main_mask.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square_red.png
style:
top: 50%
left: 50%
width: 100%
- type: image
entity: light.office_main_lights
tap_action: none
hold_action: none
state_image:
'on': /local/floorplan/1080px/office_main_mask.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square_red.png
style:
top: 50%
left: 50%
width: 100%
- type: image
entity: light.porch_light
tap_action: none
hold_action: none
state_image:
'on': /local/floorplan/1080px/porch_mask.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square_red.png
style:
top: 50%
left: 50%
width: 100%
- type: image
entity: light.under_cabinet_lights
tap_action: none
hold_action: none
state_image:
'on': /local/floorplan/1080px/undercabinet_all_mask.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square_red.png
style:
top: 50%
left: 50%
width: 100%
# Lights
- type: image
entity: light.bathroom_vanity_lights
tap_action:
action: toggle
hold_action:
action: more-info
state_image:
'on': /local/floorplan/1080px/transparent_square.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square.png
style:
top: 15%
left: 45.5%
transform: scale(0.9)
- type: image
entity: light.bedroom_nightstand_lights
tap_action:
action: toggle
hold_action:
action: more-info
state_image:
'on': /local/floorplan/1080px/transparent_square.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square.png
style:
top: 20%
left: 37%
transform: scale(0.9)
- type: image
entity: light.deck_light
tap_action:
action: toggle
hold_action:
action: more-info
state_image:
'on': /local/floorplan/1080px/transparent_square.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square.png
style:
top: 66%
left: 27%
transform: scale(0.9)
- type: image
entity: light.dining_room_main_lights
tap_action:
action: toggle
hold_action:
action: more-info
state_image:
'on': /local/floorplan/1080px/transparent_square.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square.png
style:
top: 68%
left: 36%
transform: scale(0.7)
- type: image
entity: light.kitchen_counter
tap_action:
action: toggle
hold_action:
action: more-info
state_image:
'on': /local/floorplan/1080px/transparent_square.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square.png
style:
top: 72%
left: 42%
transform: 'scale(0.3, 0.6)'
- type: image
entity: light.living_room_main_lights
tap_action:
action: toggle
hold_action:
action: more-info
state_image:
'on': /local/floorplan/1080px/transparent_square.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square.png
style:
top: 43%
left: 40%
transform: 'scale(1.4,1)'
- type: image
entity: light.office_main_lights
tap_action:
action: toggle
hold_action:
action: more-info
state_image:
'on': /local/floorplan/1080px/transparent_square.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square.png
style:
top: 68%
left: 57%
transform: 'scale(1,1)'
- type: image
entity: light.porch_light
tap_action:
action: toggle
hold_action:
action: more-info
state_image:
'on': /local/floorplan/1080px/transparent_square.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square.png
style:
top: 46%
left: 62%
transform: 'scale(0.5, 1.1)'
- type: image
entity: light.under_cabinet_lights
tap_action:
action: toggle
hold_action:
action: more-info
state_image:
'on': /local/floorplan/1080px/transparent_square.png
'off': /local/floorplan/1080px/transparent_square_red.png
unavailable: /local/floorplan/1080px/transparent_square.png
style:
top: 68%
left: 48%
transform: 'scale(0.7, 0.9)'