Iām having trouble getting the friendly_name attribute as the title of a browser_mod.popup service call.
The code Iām using is very simple, just a button wit a tap_action in a lovelace view:
- type: button
show_name: true
show_icon: true
entity: number.kxx_testen_commando
tap_action:
action: call-service
service: browser_mod.popup
data:
content:
type: entities
entities:
- number.kxx_testen_commando
title: this title should display the friendly name
dismissable: true
timeout: 15000
target: {}
show_state: true
The problem lies in the title, the orange marked line, where I would like to have the friendly_name as in the yellow lines.
Tried several variations of code, found on the forum and other places, like:
The first line (āchip-background:) is changing the color into something greenish, the second line (āmush-chip-height:) is changing the height (and width) of the āchipā. The chip has the icon or the picture in it. I just made it twice as big.
Background:
I have a Smart TV, in my porch, and have bult a remote control/media player for it (see below).
Sometimes, I switch the TV to its HDMI input which is fed from a Fire TV Cube (located in my family room) so that I can watch the same thing as my wife.
The app menu, highlights the currently selected source. When one changes the source, the relevant source button goes yellow.
So, when I am an HDMI mode, I want a popup that lets me control the Fire TV Cube. See below.
Forget some of the ugly formatting, need to fix that. That also works and I can select sources, pause play etcā¦ on the fire tv cube.
BUT - the popup doesnāt update itself when the source changes. The relevant entity (media_player.fire_tv_192_168_1_91) changes its attribute āapp_idā. But the popup doesnāt update.
Reminder, everything works, when its not wrapped in a popup.
Popup code at the bottom of this post.
Can someone kick me in the right direction?
If this is a limitation of Browser_mod, perhaps clever people can suggest a work-around?
i.e.
a 15 second timer that refreshes the popup (don;t know how to do that)
a timer that triggers on a button press and refreshes the popup (don;t know how to do that).
some other wrapper that will handle the refresh (don;t know how to do that!).
a refresh button that will refresh the popup (least favorite).
I donāt have an answer, but I do have a theory as well as a possible idea. The theory is that the popup is āmodalā in programming speak this means that all other ābackgroundā processing is paused as long as this popup is displayed. This is something I have seen many times before on other systems but I canāt be certain if that is what is happening. I would need to do some tests to see if thatās whatās happening. My idea is, could you create a dashboard page that gets loaded instead of the popup providing the functionality you need?
Thanks for the thoughtful reply.
Iāve considered abandoning browser_mod and using a subview.
It would work.
But visually it would be suboptimal. Iām certain it would work - but a popup would be preferred.
Iām trying to take this and turn it into a kind of one script template for all of my cameras but the code below does not work. Can anyone see what Iām doing wrong?
script.test_popup.yaml
alias: 'test popup tap action'
sequence:
- service: browser_mod.popup
data_template:
deviceID: "{{ deviceID }}"
title: []
content:
type: picture-entity
entity: "{{ entityID }}"
camera_view: live
autoclose: true
timeout: 7000
#left_button: Left
#right_button: Right
size: wide #fullscreen, normal
dismissable: true
I know this post is old, but did you ever figure out a work around for this? Is there any other drop down card that have come out that will work in a POP up card?
No, never did find a solution, beyond making pop-ups full screen, or putting any dropdowns nearer the top.
Judging from the comment by Thomas (the browser-mod developer) in the now closed GitHub issue I linked to, overflowing dropdowns on a popup is something that just canāt be done.