Skip to content

[Bug]: Action on template card not working #1842

Description

@joaopequeno-git

Requirements

  • I checked the troubleshooting section in the README to verify that I have the latest Mushroom version.
  • I did a search to see if there is a similar issue or if a pull request is open.
  • I have read the state of card mod support (in pin issues) and understand card mod support is not provided in this repository.

Current Behavior

When creating an actionable icon, if there is no primary and i click on icon it does not deploy the tap_action and goes directly to the service:
type: custom:mushroom-template-card entity: switch.portao_garagem_portao_garagem primary: "" secondary: "" icon: >- {% set t2 = is_state('switch.portao_garagem_portao_fechado','on') %} {% set t3 = is_state('switch.portao_garagem_portao_aberto','on') %} {% if t2 and not t3 %} mdi:garage-variant-lock {% elif not t2 and t3 %} mdi:garage-open-variant {% elif not t2 and not t3 %} mdi:garage-alert-variant {% else %} mdi:help {% endif %} icon_color: >- {% set t2 = is_state('switch.portao_garagem_portao_fechado','on') %} {% set t3 = is_state('switch.portao_garagem_portao_aberto','on') %} {% if t2 and not t3 %} green {% else %} red {% endif %} tap_action: action: call-service confirmation: text: Confirma accionar portão? service: switch.turn_on target: entity_id: switch.portao_garagem_portao_garagem hold_action: action: more-info

Expected Behavior

If i click on text or icon it should have the same behave going into the tap_action.

Steps To Reproduce

No response

Context

YAML state

Environment

- Browser:
- HA Version:
- Mushroom:

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions