thomasloven / hass-browser_mod

🔹 A Home Assistant integration to turn your browser into a controllable entity and media player
MIT License
1.35k stars 186 forks source link

Popups with Buttons in Grids are empty #568

Open henessy31 opened 1 year ago

henessy31 commented 1 year ago

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:

Anilm3 commented 1 year ago

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

pico1881 commented 1 year ago

Same problem for me after 2023.4 update

Anilm3 commented 1 year ago

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)
60bobo60 commented 1 year ago

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

danielyc commented 1 year ago

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!

Sebaem80 commented 1 year ago

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
60bobo60 commented 1 year ago

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

kksligh commented 1 year ago

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

kksligh commented 1 year ago

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

JoostAB commented 1 year ago

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

Phoenix-DH commented 1 year ago

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

theone11 commented 1 year ago

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.

60bobo60 commented 1 year ago

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

joeyjojo747 commented 1 year ago

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.

artipixel commented 1 year ago

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
slothking87 commented 1 year ago

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

scstraus commented 1 year ago

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
nima-1102 commented 1 year ago

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

Ryanmt2 commented 1 year ago

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
k825k commented 1 year ago

Same problem.....

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

Swebi commented 1 year ago

Any fix for this?

SdeGeata commented 1 year ago

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

rhino53150 commented 1 year ago

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

jenssvedlund commented 1 year ago

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

kosmaluk commented 1 year ago

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.

stale[bot] commented 11 months ago

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.

Jpsy commented 10 months ago

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