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

My working conifg looks something like this.

    tap_action:
      action: fire-dom-event
      browser_mod:
        command: popup
        title:  []
        card:
          type: "custom:vertical-stack-in-card"
          cards:
            - type: thermostat

Safe to assume you cleared your cache? Most of my issues with Browser_mod are solved this way.

Try working with only one card to prove it works before stacking in other cards.

Yes, I did. I tested your code and it worked so I think the problem now is with the custom:button-card component that doesnā€™t accept fire-dom-event as action.

Edit: My mistakeā€¦ i ll try to update the custom:button-card


3.4.2 (2021-02-17)
Bug Fixes
Support for fire-dom-event (f4fcbfe), closes #429

Edit 2: All good now! Ty!!

1 Like

Hi, seems like Browser Mod is quite ā€œtalkativeā€ :smiley:
My database is growing fast, and I am aware of the option to filter out sensors, but nevertheless, I guess it still generates a lot of traffic. Any way of reducing the frequency of reporting the sensor value? My three Browser Mod sensors have by far the most number of entries in my DB.

I canā€™t get the media player to work on anything but the local host where HA resides. Iā€™m using cloud and wanted to send tts ( cloud.google_say) to remote browsers( chrome and Safari on macs) but have no success. Iā€™ve set up the proper device IDā€™s ( they are reported available) , get no error messages but there is no playback. Audio playback is fine when I try to manually play a media file from within the HA browser. Any ideas?

Really very often the message ā€œcustom browser player cannot read property player of undefinedā€ is displayed instead of the browser_mod card:
- type: 'custom:browser-player'
Any hints about what to do to avoid it?

browser_mod

Hi,
do you have a new install of home-assistant?

I just yesterday noticed that my tts.cloud_say and also other media stopped working on browser_mod media-players. I cannot send any media or tts to any browser-mod media playersā€¦

Before 2021.06 it worked because I have tested it, but just yeterday wanted to test something else and it did not work. I tested a little bit more, but was not able to get it to workā€¦ Good to hear that Im not the only one!

Mine button says cant find service when i press it

Yes itā€™s a new install. Fortunately I was able to make it work today. I added a google nest to the setup and that didnā€™t work properly either so I looked around. Turned out that I had to set both the internal and external url to the cloud url. I had my internal one still set on the physical IP address. After changing that everything was fine

I had this too after reloading the server. especially on external browsers. If you edit the UI and switch positions itā€™s fine again. After setting my internal and external addresses to the cloud address I donā€™t see it pop up anymore. . Iā€™ll keep an eye on it

I cant find the service i reinstalled it aswell

When using the fire-dom-event > popup to display an iframe, is it possible to set the size?

            - type: custom:button-card
              icon: mdi:music
              show_name: false
              show_label: true
              tap_action:
                action: fire-dom-event
                browser_mod:
                  command: popup
                  title: Media Browser
                  card:
                    type: iframe
                    url: https://my.hassio:/media-browser/

2021-06-20
This is all it shows

What do I need to change so the close pop-up (mdc-dialog?) is not transparent and has four rounded corners and is divided from the cards within the pop-up?

style:
      $: |
        .mdc-dialog {
          backdrop-filter: blur(10px);
          background: rgba(0,0,0,0.5);
        }
        .mdc-dialog .mdc-dialog__container .mdc-dialog__surface {
          background: none;
          box-shadow: none;
          border-radius: 1em;
        }    
        ha-card {
          background-color: transparent;
          box-shadow: none;
        }     
        :host {
          color: transparent;
        }

My configuration is as such:

browser_mod:
  devices:
    d516f866-658301ba:
      name: desktop_chrome

I am facing the following issues:

a) browser_mod establishes 1 device and 3 entities. The device is called ā€œdesktop_chromeā€ but the seperate entities do not get this name and are still called:

- light.d516f866-658301ba
- media_player.d516f866-658301ba
- sensor.d516f866-658301ba

ā€¦essentially missing the ā€œdesktop_chromeā€ part - at least what I am gathering from the documentation.

b) When using the HA Companion App for Android on my phone there are no additional entities (with new DeviceID produced) which drives me crazy.

Is this still compatible with the applications as Iā€™ve read a couple of replies ago (around January)? I have tried removing my configuration, clearing the cache on my desktop browser (for problem a) and for the app on my phone (for problem b) and adding the configuration back on, but nothing seems to affect it.

Any ideas/information for either?

Thanks!

Iā€™ve just upgraded to the new version (after delaying it) and canā€™t get it to work. Anyone have any idea what I have done wrong:

          - type: glance
            entities: 
            - entity: switch.fanpower
              name: Dyson Fan
              tap_action:
                action: fire-dom-event
                browser_mod:
                  command: popup
                  title: Dyson Fan Controls
                  card: 
                    - type: custom:stack-in-card
                      cards:
                      entities:
                      - entity: switch.fanpower
                        tap_action:
                          action: toggle
                      - entity: switch.master_bedroom_auto_mode
                        tap_action:
                          action: toggle
                      - entity: switch.master_bedroom_night_mode
                        name: Night
                        tap_action:
                          action: toggle
                      - entity: switch.oscillation
                        tap_action:
                          action: toggle

you can add this to the iframe card: aspect_ratio: 200%

Do you mean like this?

              app-toolbar {
                background-color: red !important;
                border-radius: 20px;
                margin-bottom: 10px;
              }

KeĢpernyoĢ‹fotoĢ 2021-06-23 - 23.50.10

I think Iā€™ll ask a stupid question, but still: where to get deviceID?

https://github.com/thomasloven/hass-browser_mod#where-can-i-find-my-deviceid

Hi there , Iā€™ve been looking for a way to edit some more info pop ups - fell upon the lovelace-popup-card that says that its deprecated and I should use browser_mod.

Tried to install it and put browser_mod: in my config.yaml - suddenly all my lovely lovelace board disappeared ā€¦

Simple question , I may have overlooked the answer somewhere , is it possible to use browser mod just for some edits to pop-ups / modals / more-info and at the same time keep everything lovelace related as it is ?

Can someone clarify the correct way for the popup? The github readme shows

service: browser_mod.popup
data:
  title: Popup example
  card:
    type: entities
    entities:
      - light.bed_light
      - light.kitchen_lights
      - light.ceiling_lights
  deviceID:
    - this
    - dashboard

but a lot of people in this thread are saying

  action: fire-dom-event
  browser_mod:
    command: popup
    large: false
    hide_header: false
    title:
    card:
      type:

and there are even other ways mentioned, like:

tap_action:
  action: call-service
  service: browser_mod.popup
  service_data:
    title: Popup example
    card:

Ive tried both and cant for the life of me get pop ups working. Do I need DeviceID if I just want it to popup on every device? Is there another integration that is just for pop-ups?

Hereā€™s the code Im trying to use for a bedroom panel:

                  type: custom:button-card
                - entity: switch.bedroom_ceiling_fan
                  name: Bedroom Fans
                  show_name: false
                  icon: mdi:fan
                  tap_action:
                    action: fire-dom-event
                    browser_mod:
                      command: popup
                      title: Fans
                      card:
                        customTheme: false
                        entities:
                          - entity: switch.bedroom_ceiling_fan
                          - entity: switch.bedroom_window_fan_on_off
                          - entity: switch.node_2_2
                        name: MBR Fan Not Custom
                        show_header_toggle: false
                        title: null
                        type: entities
                        card_mod: null
                        style: |
                          ha-card {
                          --ha-card-background: rgba(43, 55, 78, 0.5);
                          padding: 5%;
                          border-radius: 25px;
                          border-style: outset;
                          border-width: 3px;
                          border-color: rgba(152, 167, 185, 0.2);
                          }
                  styles:
                    card:
                      - background-color: transparent
                    icon:
                      - width: 30px
                  state:
                    - value: 'on'
                      color: null
                      spin: true
                    - value: 'off'
                      color: gray
                  type: custom:button-card
1 Like