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

Browser_mod.popup with action button makes it close the popup

Open cedricdelecole opened this issue 1 year ago • 2 comments

My Home Assistant version: 0.XX.X

What I am doing: Popup window using browser_mod, with an action button to call a service

What I expected to happen: Action button cshould call the service

What happened instead: Action button calls the service, but also closing the popup window automatically ;-(

Minimal steps to reproduce: Open Browser_mod popup with any action button (you will see it closes the popup ...)

# The least amount of code or steps possible to reproduce my error

# Put your code/steps here

`  - service: browser_mod.popup
    data:
      title: Caméra Extérieure
      dismissable: false
      content:
        camera_view: live
        type: picture-glance
        entities: []
        camera_image: camera.192_168_1_110
      timeout: 60000
      size: fullscreen
      browser_id:
        - Lenovo-tablette
      right_button: Arrêter la sonnerie (3)
      right_button_action:
        service: media_player.media_stop
        data:
          entity_id: media_player.lenovo_tab_m10_plus_3rd_gen
  - service: media_player.play_media
    target:
      entity_id: media_player.lenovo_tab_m10_plus_3rd_gen
    data:
      media_content_type: music
      media_content_id: http://xxx.be:8123/local/lili.mp3`


**Error messages from the browser console:**

// Select everything from the browser console and copy it

// Paste it here


---

**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.

cedricdelecole avatar Feb 05 '24 13:02 cedricdelecole

I think this is intended. You can add a button that just calls the service without closing the popup:

    data:
      title: Caméra Extérieure
      dismissable: false
      content:
        type: vertical stack
        cards:
        - camera_view: live
          type: picture-glance
          entities: []
          camera_image: camera.192_168_1_110`
        - type: custom:button-card
         ....

Simsala91 avatar Feb 09 '24 13:02 Simsala91

Thank you, then if it is confirmed it is intended that the popup closes whenever you push one of the buttons, then the case can be closed.

cedricdelecole avatar Feb 12 '24 12:02 cedricdelecole