hass-browser_mod icon indicating copy to clipboard operation
hass-browser_mod copied to clipboard

Popups with Buttons in Grids are empty

Open henessy31 opened this issue 1 year ago • 27 comments

My Home Assistant version: 2023.4.1

What I am doing: I updated to HA 2023.4(.1)

What I expected to happen: Pop Ups should be displayed.

What happened instead: Pop Ups containing a Grid with Buttons is showing nothing

Minimal steps to reproduce: I just updated.

square: true
columns: 4
type: grid
cards:
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: switch.gruppe_heimkino_switch
    name: Heimkino
    icon: mdi:power-plug
    theme: minimalist-mobile

By replacing the space in the checkboxes ([ ]) with an X below, I indicate that I:

  • [X] Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).

  • [X] Have made sure I am using the latest version of the plugin.

  • [X] Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.

  • [X] Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.

henessy31 avatar Apr 07 '23 06:04 henessy31

Same here, I couldn't see any related logs either.

Anilm3 avatar Apr 07 '23 09:04 Anilm3

Same problem for me after 2023.4 update

pico1881 avatar Apr 07 '23 12:04 pico1881

Digging a bit deeper, I can see some exceptions in chrome when I open the popup, the exceptions don't show up in a different dashboard I have with the same buttons but without browser-mod:

hui-button-card.ts:87 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'switch.tv_remote')
    at i.transformer (hui-button-card.ts:87:37)
    at i.set [as _stateObj] (transform.ts:43:52)
    at transform.ts:79:20
    at Set.forEach (<anonymous>)
    at r.willUpdate (transform.ts:77:18)
    at i.performUpdate (reactive-element.ts:1329:14)
    at i.scheduleUpdate (reactive-element.ts:1263:17)
    at i._$Ej (reactive-element.ts:1235:25)

Anilm3 avatar Apr 07 '23 12:04 Anilm3

I noticed that only the popups related to the "type: light" are displayed but not the "type: button"

60bobo60 avatar Apr 08 '23 09:04 60bobo60

Having the same issue with the button cards. The problem only occurs if there is an entity specified in the button.

Just specify a tap action with a service call and don't specify an entity within the button as a workaround!

danielyc avatar Apr 08 '23 18:04 danielyc

the same phenomenon has been happening to me since the update to 2023.4... almost all popups no longer work or nothing happens with the tap action.

In the upper part of my dashboard are several chips with auto-entities in the popups. these continue to work.

     action: fire-dom-event
      browser_mod:
        service: browser_mod.popup
        data:
          title: Welche Lichter sind aktuell an ?
          content:
            type: custom:auto-entities
            filter:
              include:
                - domain: light
                  state: 'on'
              exclude:
                - domain: light
                  attributes:
                    type: browser_mod
                - entity_id: light.alle_lichter
            card:
              type: entities
              show_header_toggle: false

The other popups on my dashboard unfortunately no longer… The following is an example that worked until the update...

show_icon: true
type: button
icon: phu:nuki
tap_action:
  action: call-service
  service: browser_mod.popup
  data:
    title: Was möchtest Du ?
    left_button: Haustür Öffnen ?
    right_button: Haustür abschließen ?
    right_button_action:
      service: lock.lock
      data:
        entity_id: lock.nuki_emde_home_lock
    left_button_action:
      service: lock.open
      data:
        entity_id: lock.nuki_emde_home_lock
theme: ios-dark-mode-blue-red

Sebaem80 avatar Apr 08 '23 19:04 Sebaem80

Having the same issue with the button cards. The problem only occurs if there is an entity specified in the button.

Just specify a tap action with a service call and don't specify an entity within the button as a workaround!

I try thanks

60bobo60 avatar Apr 09 '23 08:04 60bobo60

I have a similar issue - reported it here - https://github.com/home-assistant/core/issues/91124

kksligh avatar Apr 09 '23 20:04 kksligh

I'm using tile cards instead of button cards in my grid pop outs as a workaround if anyone is needing something. The problem is definitely when an entity is assigned to the button. If you want I show states with your buttons, tile or mushroom cards can be used as alternatives

kksligh avatar Apr 10 '23 23:04 kksligh

Same here... The shadow-root of button cards just stays empty in popup: image

JoostAB avatar Apr 11 '23 07:04 JoostAB

Same issue here, buttons are not shown anymore. Will try the workarrounds as a test.

Phoenix-DH avatar Apr 13 '23 07:04 Phoenix-DH

I also have the button card missing problem in popups - still missing in 2023.4.3

Using the Tile Card workarround for now - would prefer the Button Card.

theone11 avatar Apr 13 '23 07:04 theone11

I restored to Core 2023.3.6 and now everything still works, I will wait to update when the problem is solved

60bobo60 avatar Apr 13 '23 16:04 60bobo60

Big issue for me with lots of pop-up cards with buttons missing in grids. As a work around I'm using https://github.com/custom-cards/button-card. Changing from type: button_to_type: custom:button-card_is a quick workaround.

joeyjojo747 avatar Apr 14 '23 03:04 joeyjojo747

Same error. Temp workaround worked with custom button card. If you are calling a service on click or sending data to a service, you will need to change service entity_id to be configured under service_data like this:

type: custom:button-card
  name: 'Button'
  show_name: true
  tap_action:
      action: call-service
      service: YOUR_SERVICE
      service_data:
        timer_minutes: 10 # Example data parameter
        entity_id: YOUR_ENTITY # i.e. switch.boiler

artipixel avatar Apr 14 '23 19:04 artipixel

I have the same problem. I use bootstrap grids on my pop ups and any button that is not a custom buttoncard doesnt display for some reason. Ever since updating to 2023.04 I have had the problem. Downgrading fixes it

slothking87 avatar Apr 24 '23 10:04 slothking87

Same error with button cards:

  - type: custom:popup-card
    entity: sensor.trash_display
    title: "Trash Needs Taking Out"
    card:
      type: button
      name: I took it out!
      tap_action:
        action: call-service
        service: input_boolean.turn_off
        service_data:
          entity_id: input_boolean.trash_needs_taking_out
      entity: sensor.trash_display

tried to emulate @artipixel's example above, but no dice with this either:

  - type: custom:popup-card
    entity: sensor.trash_display
    title: "Trash Needs Taking Out"
    card:
      type: button
      name: 'I took it out!'
      show_name: true
      tap_action:
          action: call-service
          service: input_boolean.turn_off
          service_data:
            entity_id: input_boolean.trash_needs_taking_out

scstraus avatar May 03 '23 21:05 scstraus

Same problem:

i-button-card.ts:88 
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'light.bed')
    at i.transformer (hui-button-card.ts:88:37)
    at i.set [as _stateObj] (transform.ts:43:52)
    at transform.ts:79:20
    at Set.forEach (<anonymous>)
    at r.willUpdate (transform.ts:77:18)
    at i.performUpdate (reactive-element.ts:1329:14)
    at i.scheduleUpdate (reactive-element.ts:1263:17)
    at i._$Ej (reactive-element.ts:1235:25)
type: button
name: Philips Hue
icon: mdi:floor-lamp-dual
icon_height: 32px
show_name: true
show_icon: true
hold_action:
  action: none
tap_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    data:
      title: Philips Hue
      size: normal
      content:
        type: button
        tap_action:
          action: toggle
        entity: light.bed
        show_state: false
        hold_action:
          action: none
        show_name: true
        show_icon: true
        icon_height: 46px
        icon: mdi:bed

Swapping "type: button" to "type: custom:button-card" in the popup fixes the issue, as a temp solution.

Home Assistant 2023.5.2 Supervisor 2023.04.1 Operating System 10.1 Frontend 20230503.3 - latest

Browser Mod: 2.2.1

nima-1102 avatar May 06 '23 22:05 nima-1102

Same problem. Even a basic popup with just a button in will reproduce the error

show_name: true
show_icon: true
type: button
tap_action:
  action: fire-dom-event
  target: this
  browser_mod:
    service: browser_mod.popup
    data:
      title: button missing
      content:
        type: horizontal-stack
        cards:
          - show_name: true
            show_icon: true
            type: button
            name: This button will not display
          - type: markdown
            content: Other cards still work OK
name: Missing Demo Button

Ryanmt2 avatar May 10 '23 12:05 Ryanmt2

Same problem.....

version core-2023.5.3 Home Assistant OS 10.1 supervisor-2023.04.1 browser mod (2.2.1)

k825k avatar May 19 '23 13:05 k825k

Any fix for this?

Swebi avatar Jun 03 '23 14:06 Swebi

Same problem here. Just commenting so i can get an update on any fixes.

SdeGeata avatar Jun 26 '23 15:06 SdeGeata

Same problem here. Just commenting so i can get an update on any fixes

rhino53150 avatar Jul 25 '23 02:07 rhino53150

Same problem here. Just commenting so i can get an update on any fixes

jenssvedlund avatar Sep 14 '23 16:09 jenssvedlund

ja również mam ten problem, zmieniłem okienka na custom button i działają w chrome i aplikacji towarzyszącej, natomiast w wallpanel nie działają mi akcje tap_action. Może ktoś się spotkał z tym dodatkowym problemem i zna rozwiązanie.

kosmaluk avatar Sep 27 '23 13:09 kosmaluk

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 15 '23 06:12 stale[bot]

Not stale at all. This bug is very much alive and kickin'.

Jpsy avatar Dec 29 '23 14:12 Jpsy