Hi friends, is it possible to close a popup after a certain action been taken?
Example, itās a pop that shows lights. IF all lights are off, can it just autoclose?
How in the world can I change the background color of a full screen popup?! I I have the following code in my automation but it doesnāt seem to have any impact. Any help is GREATLY appreciated!
First of all, Bear with me, I am fairly new to HA, so I might miss some simple but essential concepts
I am trying to get a streaming radio card working on my dashboard in the browser, where the audio is output through the current browser.
I am using the mini media player and browser_mod functionality,
Iām trying now to get the browserID of the current browser into the card, so I can dynamically adjust the entity_id.
tap_action:
action: fire-dom-event
browser_mod:
service: script.print_clicking_browser
data:
browser_id: THIS
with the script:
script:
print_clicking_browser:
sequence:
- service: system_log.write
data:
message: "Button was clicked in {{browser_id}}"
Should print `āButton was clicked in 79be65e8-f06c78fā to the Home Assistant log.
But in my case I only see āButton was clicked ināā¦
Iām at a loss on how to get the browser_id into a script or to a media_player. Can anyone enlighten me or put me on the right track? A working example would be appreciated.
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).