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

First time browser mod user here. Pretty experienced Home Assistant user (18 months in).

Working with the companion app on a Samsung Android tablet (not sure if that makes a difference?)

Iā€™ve installed browser mod as per instructions, cleared the companion app cache and cache in Chrome browser. Followed setup instructions to register browser:

However, when I try a test popup in Developer Tools:

service: browser_mod.popup
data:
  title: Title
  content: Test text

I get an error:

This service requires a target, please define a target entity_id, device_id, or area_id under target: or data:

I cannot see anywhere in the documentation where it says anything about having to define a target to test if a browser popup works.

What am I doing wrong?

Hmā€¦ i have installed 2024.7.0 but popups work hereā€¦
I have a bunch of popups with custom button card, all work like before.

Hi, as @Protoncek states: they are not broken with 2024.7.0 but something with your setup will be the issue.
Which version of HA did you run before this one?

There are 2 different types of popups.

The one via the tap_action which seems working (but you have no gui edit Options, only yaml Code), and the one via type: custom:popup-card which seems broken.

Not all cards Support tap_action and for them we need the custom popup-card (which ist broken).

Actually, there is something broken in 2024.7
Take look on:
https://github.com/thomasloven/hass-browser_mod/issues/719
and:
https://github.com/thomasloven/hass-browser_mod/issues/715

After updating to 2024.7 Iā€™ve noticed that the Frontend Settings options no longer display properly. The top level options themselves are listed, but none of them expand. This is happening in the browser and the companion app, and deleting and readding the integration doesnā€™t seem to have helped. Is anyone else experiencing this, or is there anything else I can try?

Hi,

Iā€™ve started using fire-dom-event with browser_mod to show me a popup when I click on a card, but anytime I go to edit the card, it doesnā€™t let me access UI mode, which is fine, except the action is just this:

tap_action:
  action: ''

This was claimed to be fixed here: fire-dom-event gets replaced with ā€˜ā€™ inside the visual editor Ā· Issue #19379 Ā· home-assistant/frontend Ā· GitHub, but it still occurs to me.

The only way I can actually keep it intact is if I press ā€œshow code editorā€ in the entire stack, which gets annoying because I have a lot of code in the other cards in the stack and I have to scroll a lot to find what I want and sometimes if iā€™m not even editing the mentioned card but a different one in the stack and save, the action also gets erased.

Is there a solution for this?
Iā€™m on 2024.7.2

:wave: Morning!

Is there any way to set a prefix for all Browser Mod entities? So everything could be media_player.browser_mod_browser_id etc? That would solve a lot of issues such as excluding from recorder or HomeKit with entity globs.

1 Like

Greetings,
i read most of the topics here but cant find any solution to my problem.
Is there a way to use the selector to set a input select?

If i use following i cant get the params to the data part
Error: input_number/set_value. extra keys not allowed @ data[ā€˜paramsā€™]

            tap_action:
              action: fire-dom-event
              browser_mod:
                service: browser_mod.popup
                data:
                  size: normal 
                  title: How long?
                  right_button: Start
                  right_button_action:
                      service: input_number.set_value
                      entity_id: input_select.watering
                      data:
                  content:
                    - name: params
                      label: Time
                      selector:
                        select:
                          multiple: false
                          options:
                            - label: 5min
                              value: 5
                            - label: 10min
                              value: 10
                            - label: 15min
                              value: 15

Click on the developer tools icon and then ā€œServiceā€ and enter input_select. You will find there are 7 services. If you have ā€œSpookā€ installed, there will be 10 services.

So from your example above you want the

service: input_select.select

With the appropriate data: filled in. You also have first, next, prev, etc. as choices.

Is it possible to change the close button of the popup to the right side? Because I am using my smartphone with my right thumb and for me it would be easier to reach if the X is on the right side instead of the left side.

Hi, iā€™m currently trying to create a browser mod popup template for my thermostat cards, which i will store in a file. The climate button card template will include the path to the file in the tap_action. Not every room has a humidity sensor, but when there is one i want to specify it with a humidity_entity variable, which the popup needs to access.
The final card config should look like this:

- type: custom:button-card
  entity: climate.nome
  humidity_entity: sensor.thermostat_nome_humidity
  template:
      - icon_climate
      - climate

The test config looks like this, but the humidity does not work:

- type: custom:button-card
  entity: climate.nome
  humidity_entity: sensor.thermostat_nome_humidity
  template:
      - icon_climate
      - climate
  tap_action:
      action: fire-dom-event
      browser_mod:
      service: browser_mod.popup
      data:
          title: " "
          content:
            type: custom:layout-card
            layout_type: custom:masonry-layout
            layout:
                width: 400
                max_cols: 1
            cards:

              - type: custom:more-info-card
                view_layout:
                    grid-area: moreinfo
                title: ''
                show_header_toggle: false
                entity: >
                    [[[
                        return entity.entity_id;
                    ]]]

              - type: custom:mini-graph-card
                name: Temperatur Verlauf
                entities:
                    - entity: >
                        [[[
                            return entity.entity_id;
                        ]]]
                      attribute: current_temperature

              - type: custom:mini-graph-card
                name: Luftfeuchtigkeit Verlauf
                entities:
                    - entity: >
                        [[[
                            return humidity_entity;
                        ]]]

Ignore. I never registered my second device. That is why it wasnt showing

Hi, I have the problem that for ha rel. 2025.02 mqtt.publish payload_template will be depreciated. I have to change to only payload. At the moment my code looks like:

          - entity: sensor.vitodens_heizung_mittwoch
            name: Heizung Mittwoch
            icon: mdi:timer
            hold_action:
              action: fire-dom-event
              browser_mod:
                service: browser_mod.more_info
                data:
                  entity: sensor.vitodens_heizung_mittwoch
                  large: false
                  ignore_popup_card: true
            tap_action:
              action: fire-dom-event
              browser_mod:
                service: browser_mod.sequence
                data:
                  sequence:
                    - service: script.vitodens_input_heizung_mittwoch
                    - service: browser_mod.popup
                      data:
                        deviceID: this
                        title: Heizung Mittwoch
                        content:
                          type: entities
                          entities:
                            - entity: input_text.vitodens_heizung_mittwoch
                        right_button: Set
                        right_button_action:
                          service: mqtt.publish
                          data:
                            qos: 0
                            retain: false
                            topic: HEATING/setHMi
                            payload_template: >-
                              {{ states('input_text.vitodens_heizung_mittwoch')
                              }}  

The problem is if I change payload_template to payload it will not work. It will send via mqtt {{states(ā€˜input_text.vitodens_heizung_dienstagā€™)}} and not the real value.
Hopefully someone could help.

hello !! thanks for this plugin is great!!

So i have a question as its my first time that i use itā€¦

I want to setup automation that the popup will display a switch button card ā€¦ what i must put in content?

may someone help me?

edit: i found it Screenshot by Lightshot but is possible to add a type: custom:webrtc-camera url to see my cam?

edit 2: i found it thanks

Hi, can you please explain how do you create binary_sensor.home sensor?
Thank you

Hi,

I am new to this custom integration, it looks promising. And i am using it for my touchscreen home media viewerā€¦ (Hou do I call this, itā€™s a tablet/raspberry pi touchscreen in the middel of my home with home assistant in kiosk View) With speakers, and that where i play radio from. But i also want to announce there is a Visitor at the door (doorbel).

After the announcement I want to play along with my radio.

I tried announce: true in the service call/action and also save the state with a scenes. Both not working. Do you have any tips?

Is there also a what to trigger assist with mic?

Iā€™ve given a group of (trustworthy!) friends remote access to one of my dashboards but the 1st time each one logs on they get to see all the entities on the default dashboard. They all share the same logon and I use browser_mod frontend settings to hide the sidebar and set the default dashboard for that user. All the other controllable dashboards have their visibility denied to that user.
This can also happen after a re-start of the HA server after theyā€™ve been using it as expected, only able to see the one dashboard.
If I get them to clear their browser cache & log back in HA behaves as it should - the donā€™t see the sidebar and only the one dashboard. FYI I use custom-popups to control their ability to interact.
Can anyone suggest what might be going wrong (apart from me granting external access to my HA instance!).

Iā€™m trying to call the service to hide and how side and top bar as available within integration but it appears these services are not exposed. Any idea how to make following work then ?

alias: Switch Theme and Toggle Sidebar/Topbar
trigger:
  - platform: state
    entity_id: input_select.side_and_top_bar_selector
action:
  - data_template:
      name: >
        {% if is_state('input_select.side_and_top_bar_selector', 'default') %}
          default  # Replace with your actual light theme name
        {% elif is_state('input_select.side_and_top_bar_selector',
        'ios-dark-mode') %}
          ios-dark-mode  # Use the ios-dark-mode theme
        {% endif %}
    action: frontend.set_theme
  - data_template:
      command: >
        {% if is_state('input_select.side_and_top_bar_selector',
        'ios-dark-mode') %}
          hide
        {% else %}
          show
        {% endif %}
      deviceID: "{{ browser_mod.current_device_id }}"
    action: browser_mod.sidebar
  - action: browser

hi all
right now I am still in browser mode 1.0. I never upgrade to browser mode 2.0 because I donā€™t have the time and the courage to rewrite/check 2 thousand rows which I have in my setup.
Until now everything is working fine but I am not sure if this will be the case in the near future.

right now I am getting the following message
Is there something I could do to fix it? I donā€™t know where it device class motion is

Logger: homeassistant.components.binary_sensor
Source: helpers/deprecation.py:197
integration: Binary sensor (documentation, issues)
First occurred: 11:26:18 (2 occurrences)
Last logged: 11:26:18

DEVICE_CLASS_MOTION was used from browser_mod, this is a deprecated constant which will be removed in HA Core 2025.1. Use BinarySensorDeviceClass.MOTION instead, please report it to the author of the 'browser_mod' custom integration