#Picture element card can only tap element once, then I can not tap different element.

1 messages · Page 1 of 1 (latest)

onyx night
#

I have created floorplan with several element for different lights. after restarting HA, I can tap picture for kitchen light and light turns on and shows that light on in card. When I tap stove light to turn on, it opens the kitchen lights device control card , not sure what to call it but has the switch for turning on kitchen light. How do I reset card so I can tap each light on card without opening a device switch card?

type: picture-elements
image: local/Floorplan/8710Base530.png
elements:

  • type: image
    entity: switch.shelly_tv_light
    state_image:
    "on": local/Floorplan/8710TVlights530cropped.png
    "off": local/Floorplan/8710Transparent.png
    style:
    left: 50%
    top: 50%
    width: 100%
  • type: state-icon
    entity: switch.shelly_tv_light
    tap_action:
    action: toggle
    style:
    left: 33%
    top: 34%
    rotate: 90deg
    opacity: 0
    "--mdc-icon-size": 55px
    "--paper-item-icon-color": white
  • type: image
    entity: switch.front_door_light
    state_image:
    "on": local/Floorplan/8710FrondDoorLight530cropped.png
    "off": local/Floorplan/8710Transparent.png
    style:
    left: 50%
    top: 50%
    width: 100%
  • type: state-icon
    entity: switch.front_door_light
    tap_action:
    action: toggle
    style:
    left: 70%
    top: 65%
    rotate: 90deg
    opacity: 0
    "--mdc-icon-size": 40px
    "--paper-item-icon-color": green
  • type: image
    entity: light.shelly_piano_lights
    state_image:
    "on": local/Floorplan/8710PianoLights530cropped.png
    "off": local/Floorplan/8710Transparent.png
    style:
    left: 50%
    top: 50%
    width: 100%
  • type: state-icon
    entity: light.shelly_piano_lights
    tap_action:
    action: toggle
    hold_action:
    action: more-info
    style:
    left: 46%
    top: 45%
    rotate: 0deg
    opacity: 0
    "--mdc-icon-size": 55px
    "--paper-item-icon-color": green
fallow rover
#

Maybe you need to set the tap_action for the image element to none?

#

It's probably drawing the image on top of the other button, and when you click on the image it's doing the default tap action for that entity (load the more-info dialog)

onyx night
#

That makes sense, but none stops is from working. Once I tap one of the state-icons, that element become the only thing that opens. I am useing this youtube video as my guide https://www.youtube.com/watch?v=O2OhO9R4bAk

Lets crack on! follow along how to; Take photos and edit the images to get the light blending.

PART1 - SweetHome 3D design phase
https://youtu.be/sz-nfSavQSQ
PART2 - SweetHome 3D exporting and Gimp Light Blending phase
https://youtu.be/OiW8lzkXlnI

Video Chapters:
00:00:00 - Into
00:00:23 - Switches
00:01:45 - Folder structure
00:03:01 - Dash...

▶ Play video
fallow rover
#

I'm not sure. Maybe if you change around the order of the elements it will make a difference.
Or you can try adding "z-index": -1 to the image style

onyx night
#

it is almost like the entire image becomes the trigger

fallow rover
#

well an image is clickable, and if it is large it might get drawn on top of your other things

onyx night
#

is there a way to make image click do nothing?