Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tap_action: inconsistency #1213

Open
ildar170975 opened this issue Feb 11, 2025 · 0 comments
Open

tap_action: inconsistency #1213

ildar170975 opened this issue Feb 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ildar170975
Copy link
Collaborator

ildar170975 commented Feb 11, 2025

https://www.home-assistant.io/dashboards/actions/#tap-action
Consider the card:

type: custom:mini-graph-card
entities:
  - entity: sensor.xiaomi_cg_1_co2
  - entity: sensor.xiaomi_cg_2_co2
    show_state: true
tap_action:
  action: more-info
  entity: sun.sun

Image

It properly shows more-info:
-- tapping on a legend label will show a more-info for a corresponding entity;
-- tapping on a state label - similar;
-- tapping on an empty area - more-info for sun.sun.

Now a bit more complex case:

type: custom:mini-graph-card
entities:
  - entity: sensor.xiaomi_cg_1_co2
  # - entity: sensor.xiaomi_cg_2_co2 # these lines may be uncommented
  #   show_state: true
tap_action:
  action: call-service
  service: switch.toggle
  service_data:
    entity_id: switch.test_switch

In this case any tap causes calling switch.toggle - no more-info for entities is shown.
This is WRONG.

Now check with a new 2024.8 syntax:

type: custom:mini-graph-card
entities:
  - entity: sensor.xiaomi_cg_1_co2
  - entity: sensor.xiaomi_cg_2_co2
tap_action:
  action: perform-action
  perform_action: switch.toggle
  target:    # or data
    entity_id: switch.test_switch

In this case no action is executed.
This is WRONG.

@ildar170975 ildar170975 added the bug Something isn't working label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant