So I just saw it is working and opening on other devices but not on āthisā devices. Testing on Chrome and Safari on Mac. So what do I need to do to open a popup on āthisā device.
Hi Skycryer,
Passing āthisā to a script with browser_mod.popup doesnāt work for me either since the latest update.
I ended up removing the deviceID in my script, that works but the popup happens to all devices. To patch this, I added a delayed browser_mod.close_popup to clear out all the popup in all devices.
If anyone has better solution, please share.
Thanks in advance.
This is my lovelace config for popup on āthisā device. Works on core-2021.2.3
tap_action:
action: fire-dom-event
browser_mod:
command: call-service
service: browser_mod.popup
service_data:
deviceID: this
title: "Sockets"
hide_header: true
card:
!include templates/cards/content_sockets.yaml
Hi kajmaj,
Thanks for sharing your code.
Is your code part of a script?
My lovelace popup works correctly just like before the major upgrade of browser_mod. Only when my tap_action calls a script that contains the browser_mod.popup has issue.
I am using browser_mod
, so far, in lovelace only.
I saw now that āthisā still works on my fire tablets bit not on my iPad or laptop with Safari or Chrome. Is that maybe a bug @thomasloven or is there something we miss?
If it still works with the latest version, then your browser cache is not cleared.
@thomasloven no difference, I tried a complete new browser (firefox), deleted the frontend cache in Home Assistant App on iOS and delete the safari cache on all devices. Popup still not opens on local device for this devices (iPad, Macbook with safari, chrome, firefox) Before the update all this worked, so config is still the same.
Hey! Iām using the script below to display a clock screensaver on an iPad/s. When I tap the screen (clock) it displays a more info dialog for the sensor. Is there any way to remove this tap action or change it to: command: close-popup
Iāve tried to use auto_close: true which does work but it also taps the underlying cards meaning that āwakingā the dashboard from the screensaver also turns lights on/ changes the music etc. (if this makes sense!)
Any genius or obvious solutions that I have may have missed?
command: popup
deviceID:
- b3c5cb7e-4a18ccb1
- 66aded30-cc370c15
title: ' '
hide_header: true
large: true
card:
type: 'custom:bignumber-card'
entity: sensor.time_12_hour
scale: 120px
Solved: Using button-card instead of bignumber-card. duh!
I tried it now on another laptop and an iPhone in privacy mode and after clearing cache. But I can only get it working on my fire tablets. But not on chrome, Firefox or safari. The samples from the readme all do not work on this devices only on the fire tablets. I have no idea what the problem is. Caching can not be because of privacy mode and reset of cache on all browsers and devices.
So, after some more testing I found that the āthisā is not getting correct translated to the deviceID in the script.
service: browser_mod.popup
data:
title: Popup example
card:
type: entities
entities:
- light.bed_light
- light.kitchen_lights
- light.ceiling_lights
deviceID:
- this
- dashboard
the call action is correct working
type: button
tap_action:
action: fire-dom-event
browser_mod:
command: call-service
service: script.popup_test_text
service_data:
deviceID: this
entity: sun.sun
because I could render out the deviceID in a markdown element see here
service: browser_mod.popup
data:
title: Popup example
card:
type: markdown
content: 'Diese deviceID ist {{ deviceID }}'
deviceID:
- tablet_arbeitszimmer
- this
After changing the script to this it works again
service: browser_mod.popup
data:
title: Popup example
card:
type: markdown
content: 'Diese deviceID ist {{ deviceID }}'
deviceID:
- tablet_arbeitszimmer
- '{{ deviceID }}'
and the call needed a change
tap_action:
action: fire-dom-event
browser_mod:
command: call-service
service: script.popup_all_light
service_data:
deviceID: this
From the documentation I saw it should just be - this as deice to show on but that Is not working for me using latest version of browser_mod and latest version of Home Assistant.
Why I canāt give device an alias
You can. In configuration.yaml:
browser_mod:
devices:
99980b13-dabc9563:
name: arrakis
Doesnāt work for me
Hello, I have the same problem, someone have a fix ? I do some test with style but I donāt find a solutionā¦
popup_cards:
sun.sun:
title: MƩtƩo
style: |
mwc-icon-button{
margin: 0 0 .35em 0
}
card:
Do not apply it in card-mod theme otherwise the original popup cross will have an offset :
frontend:
themes:
original:
card-mod-theme: original
card-mod-more-info-yaml: |
.: |
mwc-icon-button{
margin: 0 0 .35em 0;
}
$: |
.mdc-dialog {
backdrop-filter: blur(100px) !important;
}
Alias didnāt work for me either. There is a chicken and egg problem where I donāt know the device id until browser_mod runs, but once the device ids are created, browser_mod wonāt name the entities with the alias. I had to delete the entities from the entity registry, then bring up the browser. Only then did the entities get created with the alias.
Pro tip: Add a browser-player card anywhere, and click or tap the device ID in the bottom left of it.
Hey, I still canāt get button cards to use pop upsā¦
For example, I have this set from the Lovelace UI inside of a button card:
tap_action:
action: call-service
service: browser_mod.popup
data:
title: Pop Up Test
fullscreen: true
iron-overlay-backdrop-filter: blur(70px) grayscale(50%)
iron-overlay-backdrop-background-color: 'rgba(41,128,185,0.25)'
deviceID: this
card:
type: entities
entities:
- entity: binary_sensor.test
This used to work, but doesnāt work for me since last updateā¦ I tried to clean cache, it doesnāt work on mobile app either.
Any solution?