Anyone? Or am i doing something wrong?
Had the same issue, been at it for days. Finally solved it:
In the tap-action you need to send the browser ID to the script, āTHISā is not available in the scope for scripts.
tap_action:
action: fire-dom-event
browser_mod:
service: script.your_script
data:
browser_id: THIS
Then you need to use the variable that you called the script with, in this case ābrowser_idā where youe saved āTHISā (current browser_id)
action: browser_mod.popup
data:
browser_id: "{{ browser_id }}"
content:
type: some-card
Hi all.
After long time of using browser_mod.popup
with history-graph
I realized that it opens empty window with a title only (no graph at all).
Not sure when it started
I am on
Core 2025.2.5
Supervisor 2025.02.1
Operating System 14.2
Frontend 20250221.0
and I have following yaml config:
- type: custom:button-card
entity: sensor.atc_99f8_temperature
name: Pokoj
show_state: true
show_icon: false
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: Teplota Pokoj
browserID: THIS
content:
type: history-graph
hours_to_show: 48
entities:
- entity: sensor.atc_99f8_temperature
Did I miss anything in updates? Any advice how to have it back and running?
Edit: Other than history-graph
content pops up properly
Thereās a PR open with a fix
Thanks
I am trying to use this tap_action to open an iframe type card, but i get only the title of the popup and not the iframe card.
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
style: |
--popup-background-color: none;
--popup-max-width: 600px;
--popup-min-width: 450px;
--popup-border-width: 0px;
--popup-border-radius: 10px;
--popup-padding-x: 0px;
--popup-padding-y: 0px;
--dialog-backdrop-filter: blur(0.8em) brightness(1.2);
content:
- type: iframe
url: http://192.168.1.84:9000
aspect_ratio: 170%
title: Lyrion Media Server
hold_action:
action: navigate
navigation_path: /dashboard/mobile-2
Can somebody help me to fix this?
EDIT: Solved⦠Error is in the content. No need to put the ā-ā before the card type.
Hey guys,
I just integrated this and itās working well. Thank you very much!
I have the mini-media-player also integrated and would like it to be able to cast audio to both my Chrome, as well a different google cast in the house
I tried to group them in Google Home, but itās not seeing my Chrome media player as a speaker.
Even if it doesnāt work with the mini media player, are there any solutions?
hiā¦is there a way to let the browser pop up on the side?
greetings!
is there a update on PR? Will it be fixed in the official repo or to use a fork?
@Mar1us currently activity is in my fork known as the Phoenix version. See 2.3.4 discussion. This issue with graphs, buttons etc. is fixed in this version. @thomasloven was active in Jan 25 but there were many PRs left unmerged and no response when I contacted by email so in the end I started doing releases on my fork.
@kajmaj this started when HA changed chart backend. It has to do with browser mod popups not being a child of the HA DOM so donāt get HA contexts, which some cards use. You will note an error in console referencing darkMode. This is fixed in 2.3.4 which is on my fork known as the Phoenix version. See 2.3.4 discussion.
@MrNorth45 before Version 2.3.4, there may have been two copies of the code running as the JS is registered twice to be available for cast. 2.3.4 fixes this by putting bootstrap code into an event to make sure it only runs once. This is available in my fork, known as the Phoenix version. See 2.3.4 discussion. I have tested your code and it looks to work as you expect in 2.3.4.
Version 2.3.5 Released
Version 2.3.5. has been released
New Features
- Allow for User Targets. See updated SERVICES documentation for more information.
- Add service
browser_mod.deregister_browser
. This allows for cleanup of orphaned non-reporting browsers. See updated SERVICES documentation for more information.
Fixes
- Refecator popup close to fix audio playon issue for popups which include webRTC stream.
- Donāt turn browser screen on, on first connect. Allows for browsers with screen turned off to correctly stay off if refreshed, but not by user interaction.
- Update dashboard resource version after update installed.
NOTE: This version is published on my fork of Browser_Mod, known as the Phoenix Version. For those wishing to use the Phoenix version of browser_mod, checkout the instructions as per below (from updated README)
Phoenix Version
The Phoenix fork of Browser Mod 2 starts with Version 2.3.4. The version was made by @dcapslock given a backlog of PRs for the (main) repo by @thomasloven. Depending on actvity of the main repo, this fork may become the main repo and HACS adjusted accordingly.
To use the Phoenix Versoin follow these steps:
- Uninstall the current HACS version (browser_mod)
- Add
https://github.com/dcapslock/hass-browser_mod
as a custom HACS reporistory (Integration)- Download the latest Phoenix version (browser_mod_phx). As of v2.3.5, dashboard resource will be correctly updated with latest version.
- Restart Home Assistant
Will you optionally bring back the old 1.x logic that a popup stays open if you open and close more info dialods or nesting pop-ups from a popup?
Possibly. Looking at the code, allowing a standard more-info looks straight forward. Nested popups not so much given that the same DOM element is used for custom popups (browser_mod.popup and custom popup cards).
The fork was created because of lack of activity in main repo. Some PRs had been waiting nearly 6 months. There was a backlog of half a dozen critical PRs (see v2.3.4 release notes). Now a good number of desired features in 2.3.5 as well, plus some more I am already working on for 2.3.6.
First: dcapslock: thanks for your work on this card. Thereās not any activity for quite a while on original one, i agree.
Iām playing with ābrowser_mod.navigateā and for now i have some questions:
-
i canāt make navigate to work correctly from ācustom:button-cardā as ātap_actionā. When i make a card with this:
tap_action: action: call-service service: browser_mod.navigate data: path: lovelace-test browser_id: my-pc
it switches page on all other opened tabs but not on current tab (if i have multiple tabs with HA opened). But if i have only one tab opened nothing happens.
- is āuser_idā not implemented in navigate? Since when i call service (on developer tools page) it executes even if i enter other user, which is not currently logged in. This script:
always changes page (from developer tools to stated page), no matter which user i enter.action: browser_mod.navigate data: browser_id: my-pc path: lovelace-test user_id: test-user
@Protoncek I will take a look at your navigate query regarding multiple tabs. For user_id, in your case you would not use browser_id. They are both targets (think OR not AND). So you will be finding it is always targeting my-pc as well as whatever user you put for user_id.
@Protoncek for your browser_mod.navigate tap_action, I believe the issue is the path. You need to make it absolute to root with a slash ā/ā i.e. ā/lovelace-testā. Form my testing of your code, you will see the browser address bar get appended with ālovelace-testā, but nothing happen as that is not valid from current page. Otherwise, all looks good from my testing using correct absolute path from root.
Ahaā¦ok, i understood user part. I also figured it that i must enter numeric user id, not name. What i want to achieve with āuserā possibility is this:
- i have, say, three dashboards for three users
- all users have a button for navigate to same (fourth) page (like home central heating controller page)
- depending of a user button āgo backā on that fourth page user would go back to current userās home page
I guess iāll have to create a script for that, perhaps if i create three same navigate calls with different users perhaps it will work⦠iāll have to test this over the weekend. But if this is possible it will solve one of bigger problems, since now i have double, triple same pages for different usersā¦
Regarding tap action: this:
type: custom:button-card
entity: sensor.sun_next_dawn
tap_action:
action: call-service
service: browser_mod.navigate
data:
path: /lovelace-test
browser_id: my-pc
still results in same: all other tabs are changed, but not originalā¦
EDIT: hm⦠it seems that this isnāt working only from main (default) dashboard page (so overview page), on all other pages it worksā¦