custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.97k stars 242 forks source link

Cover card with custom fields cannot be activated #794

Open gideonyong opened 1 year ago

gideonyong commented 1 year ago

Checklist

Describe the bug Only with the cover entity, a button with custom fields cannot be clicked on. Hovering over the button, the mouse usually switches to a finger indicating it can be clicked on but not anymore. When I changed the entity to a switch, the button works without issue

Version of the card Version: 4.1.1

To Reproduce This is the configuration I used:

type: custom:button-card
entity: cover.van_door
name: Van Garage
state:
  - value: open
    custom_fields:
      mins: |
        [[[
          return `0m`
        ]]]
      hrs: |
        [[[
          return `0h`
        ]]]
  - value: closed
    custom_fields:
      mins: |
        [[[
          return `0m`
        ]]]
      hrs: |
        [[[
          return `0h`
        ]]]
styles:
  grid:
    - grid-template-areas: '"i i hrs" "i i mins" "n n n"'
    - grid-template-columns: 1fr 1fr 1fr

Expected behavior I expect to be able to click on the button and activate the cover

Desktop (please complete the following information): Chrome on Windows with multiple desktops

Smartphone (please complete the following information): Android Pixel 8 pro

Additional context I did some updates to HA as well as button card (and i foolishly forgot to do a VM backup...) so i am not sure what triggered this issue.