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

Hy i update butto-card today but all my user interface is againg broken. When i tap ho button card the pop up not open. Someone can help me please.
This is an example:

            - type: 'custom:button-card'
              entity: alarm_control_panel.ksenia_bticino_bt_4000_16ip
              tap_action:
                action: fire-dom-event
                browser_mod:
                  command: popup
                  title: 'My Title'
                  card:
                      type: 'custom:mini-graph-card'
                      entities:
                        - sensor.temeperatura_18

try this in your alarm.yaml

1 Like

mapping values are not allowed in line 3

please post your code so that we can see where the error is

action: fire-dom-event
browser_mod:
command: popup
  title: Alarm
  hide_header: true
  deviceID: this
  style:
    .: |
      :host .content {
        width: calc(400px);
      }
    $: |
      .mdc-dialog .mdc-dialog__container .mdc-dialog__surface {
        background: none !important;
      }
  card:
    type: alarm-panel
    entity: alarm_control_panel.risco
    states:
      - arm_home
      - arm_away

See here

2 Likes

Yes! Working thx mate !

Yay, looks like browser_mod popups are working with custom:button-card now with the new update :slight_smile:

Hello!

First of all. Thank you for the great mod. Now to my Problem. I tried to find a solution but I didnt find anything:
For me the X of close button is not aligned with the button itself. So I just want to ask if there is a fix for this to make it aligned in every popup window.

grafik

Can someone tell me how to uninstall browser mod correctly?

  • I unstalled it from integrations
  • I removed it from configuration.yaml
  • I deleted it from the folder custom components
  • I deleted it from hacs
  • I searched in entitites, all are gone

I still got many errors, they are flooding my logs!:

ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139683299554112] Received invalid command: browser_mod/update

1 Like

about the popup and other services, do you know that itā€™s impossible to call any services as popup, toast, command from the devepoler tools page? So in this way itā€™s impossible to call the services in any other part of lovelace! Moreover the popups are solved only for button and button custom card, but if you need to call a popup in any other card (like entities) clicking on entity is impossible, so the call-service doesnā€™t work anymore!

I have the same problem here, so very interrested how to solve that.

I disabled a lot of lovelace templates, and now it is solved. I have to check it out. Iā€™m also thinking that custom mod cards, also use the browser_mod, like custom mod-card, etcā€¦

How does browser_mod work with Home Assistant Cast? I am able to cast to a Google Home Hub and I can see the browser on google home hub, but I do not get a new device created for the home hub. Can browser_mod work with google home hubs?

1 Like

Thanks, I did the same, and that solved the problem for me.

I cannot figure out why my popup is not working with the new fire-dom-event syntax. Iā€™ve verified that the js console shows the necessary versions of browser_mod and custom:button-card, and Iā€™ve cleared the cache. Help please!

type: 'custom:button-card'
icon: 'mdi:music'
name: Media Players
layout: icon_name
tap_action:
  action: fire-dom-event
  browser_mod:
    command: popup
    title: Sonos
    card:
      cards:
        - artwork: cover
          entity: media_player.dining_room
          hide:
            power: true
            source: false
          info: short
          speaker_group:
            entities:
              - entity_id: media_player.tv_room
                name: Living Room
              - entity_id: media_player.bedroom_2
                name: Office
              - entity_id: media_player.bedroom
                name: Master Bedroom
            expanded: false
            platform: sonos
            show_group_count: true
          type: 'custom:mini-media-player'
        - artwork: cover
          entity: media_player.tv_room
          hide:
            power: true
            source: false
          info: short
          speaker_group:
            entities:
              - entity_id: media_player.dining_room
                name: Dining Room
              - entity_id: media_player.bedroom_2
                name: Office
              - entity_id: media_player.bedroom
                name: Master Bedroom
            expanded: false
            platform: sonos
            show_group_count: true
          type: 'custom:mini-media-player'
        - artwork: cover
          entity: media_player.bedroom_2
          hide:
            power: true
            source: false
          info: short
          type: 'custom:mini-media-player'
        - type: 'custom:button-card'
          name: Pause after Next Track
          icon: 'mdi:music-off'
          color: var(--accent-color)
          color_type: card
          tap_action:
            action: call-service
            service: automation.turn_on
            service_data:
              entity_id: automation.stop_music_after_current_track
          layout: icon_name
      type: vertical-stack

You may need to add an entity to your button for this to work.

Thank you for the recommendations. Alas! It didnā€™t work for me. Iā€™m trying to sort out the problem by trying to get a more simple popup to work. This doesnā€™t work either:

type: button
icon: 'mdi:star'
entity: light.bedside_his
tap_action:
  action: fire-dom-event
  browser_mod:
    command: popup
    card:
      type: entities
      entities:
        - light.bedside_hers
        - light.bedside_his
1 Like

Sorry, I was wrong. The issue is not with the entity but some parameters, especially deviceID, was missing from your code.

This should work (even without an entity):

type: button
icon: 'mdi:star'
tap_action:
  action: fire-dom-event
  browser_mod:
    command: popup
    title: Bedside lights
    hide_header: false
    large: false
    deviceID:
      - this
      - dashboard    
    card:
      type: entities
      entities:
        - light.bedside_hers
        - light.bedside_his
1 Like

The same problem did you fix it?