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

In order to make it works for the current browser without need to register the device
donā€™t use call-service use fire-dom-event so your code should be like this.

type: tile
name: Basement Sync Box
icon: ''
show_entity_picture: false
tap_action:
  action: toggle
vertical: false
entity: switch.basement_sync_box_light_sync
icon_tap_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    data:
      dismissable: true
      autoclose: false
      content:
        type: vertical-stack
        cards:
          - type: entities
            entities:
              - entity: number.basement_sync_box_brightness
                name: 'Brightness '
              - entity: select.basement_sync_box_hdmi_input
              - entity: select.basement_sync_box_intensity
              - entity: switch.basement_sync_box_light_sync
                name: Light Sync
              - entity: select.basement_sync_box_sync_mode
            state_color: true
          - show_name: true
            show_icon: false
            type: custom:button-card
            tap_action:
              action: fire-dom-event
              browser_mod:
                service: browser_mod.close_popup
                target:
                  entity_id: binary_sensor.elv_chrome
            name: Exit

You only use call-service if you want to do action to registered browsers.
This works for all browser_mod services since they support dom events.

1 Like

anyone else seeing extreme sluggish behavior after updating to HA 2023.11, when using the left menu browser mod item?

I need to reload a view to get it back to life, my pointer does not change upon hovering the other menu items, and also see this:

Safari Mac Desktop


I often find that the popup has a black border. When I click into the window, the border disappears. Does anyone know how to get rid of it, please?

  card-mod-more-info-yaml: |
    .: |
      ha-dialog > div:focus {
        outline: none;
      }

nemas zac :grimacing:

DĆ­k moc. :slight_smile:

1 Like

Hey,
can you show where i need do put this in?
thx

in your theme config yaml fileā€¦

1 Like

I tested it, unfortunately it didnā€™t work.
Maybe itā€™s because of the pop-up card I use.

Hi, since the HA 2023.11 update I have problems with pop-up windows. they no longer work on tap. the problem occurs only on Android/iPhone mobile devicesā€¦but not all. is this happening to others?

Iā€™ve been using browser_mod to allow colleagues to view a dashboard and Iā€™d like to count how many are connected at any time eg now or in the last 24hrs. Iā€™ve created a remote access web address using my Nabu Casa account and allowing anyone coming in to logon with a common username & password. Browser_mod directs them to the right dashboard & hides the sidebar, my web redirect stops them from navigating manually to anywhere else. So far so good, theyā€™re all happy & so far havenā€™t caused any problems by straying from the single dashboard they get access to,
A large number of browser IDs have been created (77 so far) and Iā€™ve got a template sensor that should monitor who is currently browsing. The trouble is that it doesnā€™t quite work. It gets some device/browser combinations but not most of them. With the various phones & PCā€™s Iā€™ve got I can see that 1 or 2 show up as users most of the time, others just sometimes and one never does. This is what Iā€™m doing:

{%- set devices = states | map(attribute='entity_id') | map('device_id') | unique | reject('eq',None) | list %}
{%- set ns = namespace(entities = []) %}
{%- for device in devices %}
  {%- set ids = device_attr(device, 'identifiers') | list | first | default %}
  {%- if ids[0] == 'browser_mod' %}
    {%- if states('sensor.'~ids[1]|lower~'_browser_user') not in ['unknown','unavailable'] %}
      {%- set ns.entities = ns.entities + [ids[1]] %}
     {%- endif %} 
  {%- endif %}
{%- endfor %}
{{ ns.entities |count }} browsers, being {{ ns.entities }}


          {%- set devices = states | map(attribute='entity_id') | map('device_id') | unique | reject('eq',None) | list %}
          {%- set ns = namespace(entities = []) %}
          {%- for device in devices %}
            {%- set ids = device_attr(device, 'identifiers') | list | first | default %}
            {%- if ids[0] == 'browser_mod' %}
              {%- if states('sensor.'~ids[1]|lower~'_browser_user') not in ['unknown','unavailable']  %}
                {%- set ns.entities = ns.entities + [states('sensor.'~ids[1]|lower~'_browser_user')] %}
              {%- endif %} 
            {%- endif %}
          {%- endfor %}
          {%- set allusers = ns.entities|list %}
          {%- set users = ns.entities|unique|list %}
          {%- set ns = namespace(names = '') %}
          {%- for name in users %}
            {%- set ns.names = ns.names ~ name~' = '~allusers|select('eq',name)|list|count~', ' %}
          {%- endfor %}
          {{ns.names}}

and right now I get

1 browsers, being ['DJI_laptop_chrome']
          David Inwood = 1,

despite 4 devices being connected.
Is this fixable and how can I get delete some devices that are no longer used? Hitting the dustbin in the browser_mod sidebar just hides them - they still exist in the devices list.

Does anyone else have the same problem with popup windows on mobile devices?

Ive been reading through some old closed github issues about Browser mod devices becoming unavailable in HA after 5 minutes. This is the nearest I can find to my issue. My microsoft surface pro running Edge browser in kiosk mode on Windows 10. All Windows power saving settings disabled, but the device keeps becoming unavailable, but only after several hours. I read about a workaround of playing a silent audio file on the Browser mod media player entity, to keep it ā€˜aliveā€™ but couldnt see how to do this. Has anyone here had any similar issues and managed to resolve them?

Iā€™ve tried re-registering the device in browser mod but this made no difference. Also created a long-lived access token for the device, but again, no difference.

If I use browser_mod to browse to a webpage but want the page to scroll up a little to display content a little further down the page is there a way to do this?

Thanks

1 Like

Hi, I am trying to use a theme on my popup:

tap_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    data:
      theme: minimalist_desktop
      dismissable: true
      autoclose: false
      content:
        type: custom:stack-in-card
        cards:
          - type: custom:mushroom-title-card
            title: Dishwasher
          - type: custom:stack-in-card
            mode: horizontal
            cards:
              - type: custom:mushroom-entity-card
                name: ' '
                primary_info: none
                secondary_info: none
                fill_container: false
                layout: vertical
                icon: mdi:power
                entity: switch.011040527030000342_bsh_common_setting_powerstate
                tap_action:
                  action: toggle
                icon_color: amber
              - type: conditional
                conditions:
                  - entity: >-
                      switch.011040527030000342_dishcare_dishwasher_option_extradry
                    state_not: unavailable
                card:
                  type: custom:mushroom-entity-card
                  name: Xtra Dry
                  primary_info: none
                  secondary_info: none
                  layout: vertical
                  icon: mdi:hair-dryer
                  entity: >-
                    switch.011040527030000342_dishcare_dishwasher_option_extradry
                  icon_color: orange
                  tap_action:
                    action: toggle
              - type: conditional
                conditions:
                  - entity: >-
                      switch.011040527030000342_dishcare_dishwasher_option_silenceondemand
                    state_not: unavailable
                card:
                  type: custom:mushroom-entity-card
                  name: ' Silence'
                  primary_info: none
                  secondary_info: none
                  layout: vertical
                  icon: mdi:volume-off
                  entity: >-
                    switch.011040527030000342_dishcare_dishwasher_option_silenceondemand
                  icon_color: deep-purple
                  tap_action:
                    action: toggle
              - type: conditional
                conditions:
                  - entity: >-
                      switch.011040527030000342_dishcare_dishwasher_option_intensivzone
                    state_not: unavailable
                card:
                  type: custom:mushroom-entity-card
                  primary_info: none
                  secondary_info: none
                  layout: vertical
                  tap_action:
                    action: toggle
                  icon_color: brown
                  entity: >-
                    switch.011040527030000342_dishcare_dishwasher_option_intensivzone
                  icon: mdi:liquid-spot
              - type: conditional
                conditions:
                  - entity: button.011040527030000342_stop
                    state_not: unavailable
                card:
                  type: custom:mushroom-entity-card
                  entity: button.011040527030000342_stop
                  primary_info: none
                  secondary_info: none
                  layout: vertical
                  tap_action:
                    action: toggle
                  icon_color: red
              - type: conditional
                conditions:
                  - entity: button.011040527030000342_start_pause
                    state_not: unavailable
                card:
                  type: custom:mushroom-entity-card
                  entity: button.011040527030000342_start_pause
                  primary_info: none
                  secondary_info: none
                  layout: vertical
                  tap_action:
                    action: toggle
                  icon_color: green
          - type: tile
            icon: mdi:state-machine
            tap_action:
              action: call-service
              service: ''
            icon_tap_action:
              action: call-service
              service: ''
            entity: sensor.011040527030000342_bsh_common_status_operationstate
            name: Operation State
          - type: conditional
            conditions:
              - condition: state
                entity: sensor.011040527030000342_bsh_common_status_operationstate
                state: BSH.Common.EnumType.OperationState.Run
            card:
              type: tile
              entity: select.011040527030000342_programs
              name: Program - Running
              tap_action:
                action: none
              icon_tap_action:
                action: none
          - type: conditional
            conditions:
              - condition: state
                entity: sensor.011040527030000342_bsh_common_status_operationstate
                state_not: BSH.Common.EnumType.OperationState.Run
            card:
              type: custom:mushroom-select-card
              entity: select.011040527030000342_programs
              fill_container: false
              layout: horizontal
              name: Program - Select
              icon_color: white
          - type: conditional
            conditions:
              - condition: state
                entity: sensor.011040527030000342_bsh_common_option_programprogress
                state_not: unavailable
            card:
              type: custom:bar-card
              entities:
                - entity: sensor.011040527030000342_bsh_common_option_programprogress
                  name: ' '
                  entity_row: true
                  icon: mdi:percent

the specified theme has not been applied.
Thanks :slight_smile:

Hello,

can someone has a hint where my problem is ?

the popup doesnt open on the specific device, i get a error

Dieser Dienst erfordert ein Ziel, definiere bitte eine Ziel-Entity_ID, Device_ID oder Area_ID unter Target: oder Data:

i tried ā€œdeviceidā€ too

service: browser_mod.popup
data:
  device_ID: 
    - f79e82b3_e85f5142
  title: Es hat geklingelt!!
  content:
    type: custom:webrtc-camera
    entity: camera.haustur_tapo310_hd_stream

Hey there,

We just had a baby so Iā€™ve been using baby buddy for tracking feeding and diaper changes. Iā€™ve got a drop down helper and an automation to control what information should be input into baby buddy based on the dropdown helper.

Iā€™ve been struggling getting the browser popup to control which dropdown selection to make. I tried to use the code from the installation page for the vacuum as an example, but Iā€™m stuck now. Anyone able to help on how I can get this to work?

I know there are other methods that I can do this, but I like the way this looks and so does my wife, so Iā€™m trying to get this way to work.

Thanks!

type: custom:mushroom-template-card
primary: Hello, {{ user }}
secondary: How are you?
icon: mdi:home
entity: input_select.dropdown_william_feeding_type
tap_action:
  action: call-service
  service: browser_mod.popup
  data:
    title: Will Feeding
    content:
      - name: params
        label: How was Will Fed?
        selector:
          select:
            multiple: true
            options:
              - label: Left Breast
                value: Left
              - label: Right Breast
                value: Right
              - label: Both Breasts
                value: Both
              - label: Bottle
                value: Bottle
    right_button: Go!
    right_button_action:
      service: input_select.select_option
      target:
        entity_id: input_select.dropdown_william_feeding_type
      data_template:
        option: >-
          {{
          trigger.event.data.new_state.attributes.content[0].selector.select.options[0].value
          }}

Congratulations!

3 Likes

Iā€™m trying to reference selector results in a child popup. I canā€™t figure out the syntax for either javascript or jinja to do so. (See the right_button_action below).

I would expect the value to be returned in rainchart, but all the {{ }} items are empty and I canā€™t figure out a javascript solution.

The documentation states that:
If a ha-form schema is used for content the resulting data will be inserted into the data for any _action.
I just canā€™t figure out how. Thanks

    tap_action:
      action: fire-dom-event
      browser_mod:
        service: browser_mod.popup
        data:
          browser_id: THIS
          title: Choose
          content:
            - name: rainchart
              label: Choose
              default: Daily History
              selector:
                select:
                  multiple: false
                  options:
                    - label: Hourly
                      value: "Hourly History"
                    - label: Daily
                      value: "Daily History"
          right_button: OK
          right_button_action:
            service: browser_mod.popup
            data:
              title: "RAIN"
              content:
                title: "[[[ '???' ]]]"
                type: markdown
                content: "Selected: {{ rainchart }}, {{ name }}, {{ select }}, {{ value }}."

Does anybody know how to get rid of old entries?

I removed in the browser mod menu extension all, except the one I still need.

But inside the integration I still have 27.

Thanks.

May I ask, is anyone else getting the entities going unavailable constantly?

The only way to get it to work again is to end the companion app on my tablet and restart the app.

Itā€™s getting very tedious and makes using this mod mostly unusable.

Iā€™m running it on a Google Pixel Slate.

What sort of information do you need to help diagnose the issue? Please be nice as Iā€™m fairly new to this and I may need a few pointers to begin with.

Thanks :+1:t2: