šŸ”¹ Browser_mod - turn your browser into a controllable device, and a media_player

This should be working. Iā€™ve just tested your code and it works.

My full testing code using a mushroom-light-card as the button:

type: custom:mushroom-light-card
entity: light.kitchen_cabinets
tap_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    data:
      card_mod:
        style:
          ha-dialog$: |
            div.mdc-dialog__scrim {
              backdrop-filter: blur(50px) !important;
              -webkit-backdrop-filter: blur(50px) !important;
              background-color: rgba(0,0,0,0.1) !important;
            }
      title: test
      content:
        type: horizontal-stack
        cards:
          - type: custom:mushroom-template-card

sadly it does not work for me tho
this worked for now

ā€“dialog-backdrop-filter: blur(2em);

Here it states ā€œItā€™s advisable to use a fire-dom-event tap action instead as far as possible.ā€

  • Why is the fire-dom-event method preferred (e.g. speed, reliability, etc.)?

When I call a popup card using fire-dom-event, if the view previously required a scroll bar, the scroll bar disappears causing the entire screen to shift (and then back again when the popup is closed).

  • Is there a way to prevent this shift?

When I use the new popup card, my entire view shifts to being right-justified instead of centered on a display that has extra horizontal space. On a smaller screen with no extra horizontal space, it actually causes the displayed columns to swap. The viewā€™s layout is custom:horizontal-layout and when I comment out the popup card, it returns to the center and the columns return to their proper positions, respectively.

  • Could this be an artifact of the popup card being hidden but still affecting the layout or something Iā€™m not configuring properly?

What is wrong in this?

                tap_action:
                  action: call-service
                  service: browser_mod.popup
                  data:
                    title: Map
                    content:
                      type: map
                      default_zoom: 14                    
                      entities:
                        - device_tracker.maurizio_fabiani
                      hours_to_show: 24
                      dark_mode: false 

I only get an empty popupā€¦
All was working good before the 2.0 release.
Any hints?
EDIT: How to disable light and media_player from the default browser just i did before with - disable: all?

Same here with this yaml:

                tap_action:
                  action: call-service
                  service: browser_mod.popup
                  data:
                    title: Map
                    content:
                      type: map
                      default_zoom: 14                    
                      entities:
                        - device_tracker.maurizio_fabiani
                      hours_to_show: 24
                      dark_mode: false 
tap_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    data:
      title: Map
      content:
        type: map
        default_zoom: 14                    
        entities:
          - device_tracker.maurizio_fabiani
        hours_to_show: 24
        dark_mode: false

Device registration is handled completely differently in v2.x. Read the Wiki for more information. Thomas also replied to a similar question earlier in the thread.

Thanksā€¦ i solved the first of my questions, but about the second how to disable lights and media player from the default browser? In the Thomas reply there is no answer about it.

Same as disabling other entities in HA. Go to the entity, select it, disable it. Done.

2 Likes

When turning on the camera option for a registered browser, the camera immediately starts sending video even if thereā€™s nothing actively looking at that camera. In Home Assistant we can see that the camera is ā€˜idleā€™. I donā€™t believe the camera should be consuming bandwidth unless viewed. but I can see the data usage.

Whatā€™s worse is that if I open up multiple browser windows (pretty typical) it increases for each window. Its like its trying to send data for the camera for each HA browser window open.

Hi all,
Just came from 1.5

Tried to update my code but im not getting it to work again with the new code. Anyone that can give me some insight to what im doing wrong?

Thx in advance for your time spent.

                  action: fire-dom-event
                  browser_mod:
                    service: browser_mod.popup
                    data:
                      title: Alla Lampor
                      content:
                        type: vertical-stack
                        cards:
                          - type: custom:mushroom-light-card
                            entity: light.vardagsrumslampor
                            fill_container: true
                            use_light_color: true
                            hold_action:
                              action: more-info
                            icon_type: icon
                            show_brightness_control: true
                            show_color_control: true
                            show_color_temp_control: true
                            name: Vardagsrums Golv Lampor
                          - type: custom:mushroom-light-card
                            entity: light.tv_lampor
                            fill_container: true
                            use_light_color: true
                            hold_action:
                              action: more-info
                            icon_type: icon
                            show_brightness_control: true
                            show_color_control: true
                            show_color_temp_control: true
                            name: Tv Lampor
                          - type: custom:mushroom-light-card
                            entity: light.kokslampa
                            fill_container: true
                            use_light_color: true
                            hold_action:
                              action: more-info
                            icon_type: icon
                            show_brightness_control: true
                            show_color_control: true
                            show_color_temp_control: true
                            name: Kƶkslampa
                          - type: custom:mushroom-light-card
                            entity: light.tv_led
                            use_light_color: true
                            show_brightness_control: true
                            show_color_temp_control: true
                            fill_container: false
                            name: Tv Led
                            show_color_control: true
                          - type: custom:mushroom-light-card
                            entity: light.tv_fot
                            use_light_color: true
                            show_brightness_control: true
                            show_color_temp_control: true
                            name: Tv Fot
                            show_color_control: true

That looks right. Are you sure you cleared your browser cache and the right js is loading for the new version?

what happen to browser_mod.lovelace_reload? I see thereā€™s browser_mod:refresh but it doesnā€™t reload lovelace.

I have three tablets (on my walls) and on all of them browser mod constantly randomly ā€œdrops outā€ - all sensors become unavailable. Browser mod page also says that itā€™s not connected (last connected x hours ago). I have to manually clear cache, refresh page, sometimes unregister and re-register to make it work again. On attached picture (1 day history) bottom two became unavailable at the same time (nothing happened then, and first one remained online), and available again after HA restart (i did browser mod update), but first one is still unavailable, even though it IS online and working. Note that there are ā€œtonsā€ of small grey lines - those are all ā€œunavailableā€ times.

Itā€™s pretty annoying, since some of my automation rely on these sensorsā€¦

I DO have turned off HA option (automatically close connection after 5 minutes). All of them are running on fully kiosk.

Any thoughts what could be wrong? Is it possibly a bug? I didnā€™t have problems with old browser mod versionā€¦ I really liked previous option to force device id with entry in html lineā€¦ (?deviceID=ā€¦).

One feature request: The menu that is now available via the new sidebar entry, couldnā€™t that also be made available via the usual configuration option in the integrations page? Iā€™d like to keep my sidebar rather empty and would not need to access the browser mod settings very often, but there does not seem to be another way to open the settings (besides bookmarking the URL).

2 Likes

Hi there,
Iā€™ve updated the browser_mod integration from v1.x to 2.1.3 by following instructions (removing the old version, restart, clear cache, ā€¦).

I changed my code related to fire-dom-event in my dashboard frontend pages => this work pretty well, popups are rising, and Iā€™m happy :slight_smile: .

But if I try to call the browser_mod.popup service from developer tools (as mentioned in installation notes), no popup was displayed from that place. I got the Green check mark on CALL SERVICE button telling me the service command was sent, but no popup appeared. Any advice about that behavior?

Found the answerā€¦ my current browser was not correctly registered in Browser Mod Settings.
Sounds good now :wink:

Thank you so much, been struggling with this for days!

1 Like

Sorry for replying to an old post, but is there anyway you can give the smallest example
Of code to make a simple button card popup with a different card on tapping. To work with all browsers. I just canā€™t seem to get this working itā€™s driving me crazy

90% of the examples in this thread show exactly this wanted smallest example. The doc as well. But here another one.

type: button
entity: binary_sensor.wecker_irgendwo_an
tap_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    data:
      title: Wecker
      content:
        type: entities
        show_header_toggle: false
        state_color: true
        entities:
          - entity: input_boolean.wecker
            name: Sonnenaufgang

Yeh ive Cleard Cashe and tried all i can to see to that it should be all knew and dandy. But nothing is poping. So i wonderd if my code was wrong. hmmmm