thomasloven / lovelace-popup-card

94 stars 14 forks source link

Popup repeatedly added #12

Closed septeven closed 5 years ago

septeven commented 5 years ago

Hello, I wanted a popup showing the plant status card of my plant when clicking on the custom mini-graph-card that shows a graph of my plant moisture (and light intensity).

Everything's working fine but when you click (accidentally... or not) on the plant moisture entity within the plant status's popup, it shows a new popup, and so on. That makes sense since the plant moisture sensor is the trigger in this particular view but that's obviously not a 'normal' behavior.

I'm taking the opportunity to ask. Would it be possible to have a boolean parameter for whether showing or not the title of the popup card ? - Actually, if you visualize my example well, you'll see that the popup will show both the popup's title and the plant status card's name (I'm using a workaround by setting the name to an empty space) which is not really nice (at least, IMO) edit. Nevermind, I guess I would prefer that the plant status card itself had this option...

The code:

title: Plants
popup_cards:
  sensor.miflora_palmtree_moisture:
    title: 'Palmtree'
    large: false
    card:
      type: plant-status
      entity: plant.palmtree
      name: ' '
cards:
  - type: custom:mini-graph-card
    entities:
    - entity: sensor.miflora_palmtree_moisture
      name: 'Moisture'
    - entity: sensor.miflora_palmtree_light_intensity
      name: 'Light intensity'

Thanks!

thomasloven commented 5 years ago

I think this issue is fixed. Please let me know if the latest version works (you also need to update card-tools).

The title bar needs to be there in order to get a close button on mobile, but you can set the title to an empty string...

title: ' '
septeven commented 5 years ago

Yes it's fixed - thanks