question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

more-info dialog always opens on tap if button-card is placed inside entities card

See original GitHub issue

Checklist

  • I updated the card to the latest version available
  • I cleared the cache of my browser

Describe the bug If the button card is placed inside and entities card, no matter what tap_action I provide, the more-info dialog opens (and the action is also performed)

Version of the card Version: 1.11.1

To Reproduce This is the configuration I used:


  - type: entities
    entities:
    - type: "custom:button-card"
      entity: switch.sw1
      name: Button in entities
      tap_action: 
        action: toggle
      
  - type: "custom:button-card"
    entity: switch.sw1
    name: Button
    tap_action: 
      action: toggle

Expected behavior I would expect the more-dialog to not show unless it is the action provided in tap_action

Desktop (please complete the following information):

  • Browser chrome Win, Linux
  • Version 75

Smartphone (please complete the following information):

  • Device: oneplus6
  • OS: Android 9
  • Browser Chrome
  • Version ?

Additional context Only seems to appear when the button card is inside entities, however, it is the only way I have found to be able to stack vertically 2 buttons and be able to style the background nicely using card-mod

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
RomRidercommented, Jul 26, 2019

Made it work with ev.stopPropagation(). Sorry for the multiple edits…

0reactions
RomRidercommented, Jul 30, 2019

@hcoohb, I’ll have to revert this unfortunately as it creates a lot of side effects (swipe not working anymore, double clicks when changing tabs, etc…)

Regarding your use case, if you already have a vertical-stack-in-card around why not do (excluding the vertical-stack-in-card you already have):

- type: vertical-stack
  cards:
    # That one for the icon
    - type: custom:button-card
      icon: mdi:whatever
      show_name: false
      tap_action:
        action: toggle
        entity: your_entity
    # That one for the name
    - type: custom:button-card
       show_icon: false
       name: your name
       tap_action:
         action: url
         ....

And then apply a style to each button instead of using card-mod.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub - custom-cards/button-card
Features; Configuration · works with any toggleable entity; 6 available actions on tap and/or hold and/or double click: none , toggle , more-info...
Read more >
Fun with custom:button-card - Dashboards & Frontend
Hello, is there a way to use button without entity? For example I'd like to change the on/off state based on if some...
Read more >
How To Setup Browser Mod 2.0 in Home Assistant
Popup Card. Perhaps one of the most useful features of Browser Mod is the ability to change the popup more-info dialog window of...
Read more >
Customize Your Dashboard with CUSTOM BUTTON CARDS ...
The first 1000 people to use the link will get a 1 month free trial of Skillshare: https://skl.sh/mostlychris08221Make buttons flash, ...
Read more >
Lovelace "more-info" popup : r/homeassistant - Reddit
A short tap of a button card in the Lovelace dashboard for my 8" ... for each entity for which you want "more-info"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found