Picture-elements > state-badge ignores set action

Hi everyone,

I am currently trying to implement a 3D floorplan of my flat via Sweet Home 3D. As far as the layout and reacting to state changes goes, everything is fine.

Now I wanted to overlay a couple of “state-badges” to actually control something. My idear was for a single tap to toggle and on a long press the “more information” dialog. Sounds easy, but everything I am doing just ignores the set action values and displays the “more-information” dialog. My first guess was “I did something wrong and somewhere down the line, the config is messed up” so I used the example which comes with the “picture-elements” card and append it with a simple action:

type: picture-elements
elements:
  - type: state-badge
    tab_action:
      action: toggle
    entity: light.hallway_sonoff_cabinetlight
    style:
      top: 32%
      left: 40%
image: https://demo.home-assistant.io/stub_config/floorplan.png

Here I can observe exactly the same behaviour: Clicking the badge brings up the “more-information” dialog instead of toggling the given entity.

1 Like

:thinking:

type: picture-elements
image: https://demo.home-assistant.io/stub_config/floorplan.png
elements:
  - type: state-badge
    entity: light.hallway_sonoff_cabinetlight
    style:
      top: 32%
      left: 40%
    tap_action:
      action: toggle
    hold_action:
      action: more-info

/

1 Like

Thx. I am dumb…

I just copied the typo “tab” over and over again and didn’t noticed it…