UI-Lovelace-Minimalist / UI

UI-Lovelace-Minimalist is a "theme" for HomeAssistant
https://ui-lovelace-minimalist.github.io/UI/
Other
1.62k stars 431 forks source link

Custom:Button-Card popup's not responding to the correct setting. #1358

Open AKruimink opened 1 year ago

AKruimink commented 1 year ago

Describe the bug When using thecustom:button-card there is the option to enable popup on button hold. There is the option to enable this for both light and thermostat.

Although I currently don't have thermostats, and thus cannot fully test this, it seems that the light popup doesnt respond to ulm_card_light_enable_popup: true being set, but rather requiresulm_card_thermostat_enable_popup: true to be set to function

To Reproduce Steps to reproduce the behavior:

On one of the dashboards add the following card (make sure to select a light entity)

      - type: "custom:button-card"
        template:
          - card_esh_room
        name: Office
        entity: light.PUTYOURLIGHTHERE
        icon: mdi:bookshelf
        tap_action:
          action: navigate
          navigation_path: "office"
        variables:
          ulm_custom_card_esh_room_light_entity: PUTYOURLIGHTHERE
          ulm_card_light_enable_popup: true
          ulm_card_dynamic_color: true

Hold the light button to note that nothing happens. replace the card with the following

      - type: "custom:button-card"
        template:
          - card_esh_room
        name: Office
        entity: light.PUTYOURLIGHTHERE
        icon: mdi:bookshelf
        tap_action:
          action: navigate
          navigation_path: "office"
        variables:
          ulm_custom_card_esh_room_light_entity: PUTYOURLIGHTHERE
          ulm_card_thermostat_enable_popup: true
          ulm_card_dynamic_color: true

Hold the light button again, and notice how it now pops out with the light options.

Expected behavior I expect that when setting the enable popup for light, that holding the light button pops up the light modal, and not when the thermostat popup is set.

Screenshots This only happens when ulm_card_thermostat_enable_popup: true is set and not when ulm_card_light_enable_popup: true set image

Additional context I don't know if this same happens with thermostat, and that it only pops up if light is set to true, or if both just trigger with thermostat being set, but either way one of them (and potentially both) are broken seemingly.

Also note, I run the latest version of everything required at the moment, and am using the latest version of the card provided in this repo.

Update: Setting both ulm_card_light_enable_popup: true and ulm_card_thermostat_enable_popup: true breaks the popup, only the thermostat seems to be allowed to set for it to work.

bchmura commented 11 months ago

I can confirm... I am having the same problem and the same solution made it work. @AKruimink - thank you for the work around.

My working template is slightly different, but the exact same challenge / solution. Right down to both enabled breaks it still.

- type: "custom:button-card"
          template:
            - card_light
          entity: light.ceiling_light
          variables:
            ulm_custom_card_esh_room_light_entity: light.ceiling_light
            ulm_card_thermostat_enable_popup: true
            ulm_card_dynamic_color: true