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

I figured this out. If I use it in a browser on my phone it worksā€¦ if I used the HA app it does not.

It works on my android and companion app here

Strangeā€¦Iā€™ll have to figure that out! Thanks!

Just updated to version 2.0.0. As clearly mentioned it did break everything.

Unable to figure out how this call translates to in version 2.0.0

            tap_action:
              action: fire-dom-event
              browser_mod:
                command: popup
                deviceID: this
                hide_header: true
                card:
                  type: entities
                  entities:
                    - automation.motion_in_hall_change_led_color
                    - automation.hall_lights_on_when_motion_detected

I tried using the popup service, but that displays a popup on all devices.

1 Like

Havenā€™t had time to break all my dashboards yet :rofl: but what about this?

    tap_action:
      action: fire-dom-event
      browser_mod:
        service: browser_mod.popup
        data:
          browser_id: THIS
          content:
            type: custom:sun-card

The above does work.

But the write-up says itā€™s advisable to use fire-dom-event instead of popup card.

May be I am mixing up pop-up card and browser_mod.popup service!

EDIT: Just realized a problem with this is, if you have multiple tabs open, the pop up shows on multiple tabs and you have to dismiss on all of them

As some have noticed Browser Mod 2.0 has just been released.

As some have also noticed, and the readme and release notes state, this breaks EVERYTHING.
Donā€™t update until you have the time to fix stuff.

I hope youā€™ll find it worth the inconvenience in the end, though.

9 Likes

Nice work man! \o/ This is awesome update. So many new cool thing to play with.

The only questions left are the following:

  • Are toast messages coming back or will popup messages replace them?
  • Are there instructions for the card_mod css theme of the new popup windows?

2 questions which might make upgrading easierā€¦

  1. ā€œFirst make sure you have completely removed any installation of Browser Mod 1ā€.
  • How is this actually recommended to be done?
  1. Is there a way to check where I might have used this in HA, other than break it and wait for error messages? I installed browser mod ages ago and I donā€™t remember anymore even why and what I have used it for.
2 Likes

i didnā€™t get my popups to work. is ther an extendet info, not only some code-snippeds?
in the old one it was realy easy to set up

EDIT: ok, now i got it. But ther is a Bug with the alignment of the hidden popup-carts

Am I the only one reading documentation for 2.0 and have no Idea how to proceed?

4 Likes

Iā€™m just as lost. And to make it worse, I JUST learned how to use fire-dom-events to get popup cards in my dashboards, and am using them EVERYWHERE.

Iā€™ve been refreshing this feed all day waiting for people to come in asking for more info on what to do lol

Then it should be easy. You just change:

action: fire-dom-event
browser_mod:
  service: popup
  title: Your title
  card:
    type: ... etc...

to

action: fire-dom-event
browser_mod:
  service: browser_mod.popup
  data:
    title: Your title
    content:
      type: ...etc...

Opening a popup through fire-dom-event doesnā€™t even require you to register your browser.

4 Likes

Really? Oh that makes me feel so much better! I was really worried that I was going to lose all my awesome new popup cards.

That being said, since in the README you say that to get version 2.0 to work properly, we need to fully uninstall all reference to the existing version right? Aside from deleting the few lines of code from my configuration.yaml and removing the integration from Devices and Settings, is there anything else that needs to happen? And would that not break the popup cards?

Lastly, do we need to remove the integration from HACS as well or can we just click the update button once it is removed from Devices and Settings?

Sorry if this is covered elsewhere, I really have been sitting on the GitHub page and here and Reddit trying to read all the articles, posts, and issues that come in so I hopefully donā€™t mess up my configuration

Clicking update in HACS should work.

Removing the integration from configuration.yaml and the integrations page and deleting any devices if possible should do it.

1 Like

Sweet, thanks so much for the reply, explanation, and all your awesome contributions!

Itā€™s the first time that I use browser_modā€¦Is there a way I can make a template of a popup card and use multiple time only calling browser_mod.xxxxx?

Styles do not apply on mobile. eg.

 --popup-min-width: 100px;
 --popup-max-width: 100px;

The popup remains wide from edge to edge.

Also, is it possible to globally specify popup styles as we used to?

  card-mod-more-info-yaml: | 
        $: |               
          .heading {
                display: none !important;
          }
          .mdc-dialog__scrim {
            -webkit-backdrop-filter: blur(1.5em);
            backdrop-filter: blur(1.5em);
             transition: none !important;
          }
          .mdc-dialog .mdc-dialog__container {
                -webkit-background: none;
                background: none;
          }
          etc...
3 Likes

hi can somone help meā€¦action: fire-dom-event popup isnt doing anything on android companion app (pop up isnā€™t showing up in android app)ā€¦any way to fix it? But in chrome browser both android and windows it worksā€¦

my code:

type: custom:paper-buttons-row
    styles:
      justify-content: right;
      padding: 0px 2px 0px 0px;
      margin-top: '-10px;'
      margin-bottom: '-13px;'
      filter: drop-shadow(0px 2px 2px rgba(0,0,0,0.5));
    buttons:
      - name: false
        icon: mdi:dots-horizontal
        tap_action:
          action: fire-dom-event
          browser_mod:
           service: browser_mod.popup
           data:
             title: Controller
             content:
               type: entities
            ....... and the code continues.....

is there a way to replicate browser_mod.blackout

Canā€™t see it in the list anymore

Re above, ignoreā€¦discovered I can just call service to the tablet light off which enables the same thingā€¦at least I think it does

However wanted to say, removed browser mod from config.yamlā€¦deleted the integration, added from HACS and navigate, the main stuff I use is now working very well indeedā€¦so it was super smooth and works exactly as it said it wouldā€¦thanks for the easy smooth journey

oh and one last thing, there is the option to force stay awake in the old versionā€¦is there a way to do the same in v 2.0

THANKS!!!