PiotrMachowski / Home-Assistant-Lovelace-Local-Conditional-card

This card can show and hide a specific card on current device while not affecting other windows. It does not require any integration to run.
MIT License
73 stars 6 forks source link

Doesn't work with button:card #30

Closed IGOLz closed 2 months ago

IGOLz commented 2 months ago

Hi, thanks for this awesome card but i have a problem making it work with button card.

The card works perfectly when i use it with almost anything else, but when i put a custom:button-card inside it doesn't show the card.

Here's an example: image

This is the code that's not working:

type: custom:local-conditional-card
id: tab1
default: show
card:
  type: custom:button-card
  entity: sensor.valvola_tado_bagno_camera_info_heating

Example of code working:

type: custom:local-conditional-card
id: tab1
default: show
card:
  type: alarm-panel
  entity: alarm_control_panel.alarmo

Can you fix it please?

IGOLz commented 2 months ago

For anyone having this problem, i fixed it by wrapping the button-card inside a grid like this:

type: custom:local-conditional-card
default: show
id: tab1
card:
  square: false
  type: grid
  cards:
    - type: custom:button-card
      entity: sensor.valvola_tado_bagno_camera_info_heating

And now it's working perfectly!

PiotrMachowski commented 2 months ago

Fixed in v2.1.1