I have a question with using browser_mod. I know it creates a media player for what ever web page is open. Can I use this media player to play music (mp3 file) to this device using the service: media_player.media_play?
What I am trying to accomplish is someway to play a local mp3 to a wall mount tablet. I donāt have any google home devices only amazon echo dots and an android tablet.
How to stylish also the upper part of this card? I can put styles in the slider-entity-row card, but not in the popup_cards.
Any hints?
I tried also to stylish directly the browser_mod popup but unsuccesfullyā¦
Hello. I have some problem with ābrowser_mod.popupā service. When I use it inside of any card like ābuttonā or āglanceā it works very good, no problems, I put ādeviceIDā āthisā and the popup windows opens in the browser of device where I call it. But I need to call ābrowser_mod.popupā service from script or automation. When I do it and put ādeviceIDā āthisā in script or automation popup window opens not on the device I called it, it opens on device where is HA running, but I need it to be opened on device from which I called it. If I leave ādeviceIDā blank, of course it opens on all devices but it is not solution I need. May be some one knows how to solve this problem?
Add a slider to rows in lovelace entities cards. (emphasis added)
From the card-mod readme:
IMPORTANT:mod-card is a workaround for the very few cases where normal usage of card-mod does not work. I cannot stress this enough (apparently). If you every find yourself typing type: custom:mod-card , stop, go back, read this readme all the way through again , and realized that in approximately 10 out of 10 cases, you should NOT use mod-card .
Second:
The popup has itās own style parameter fro styling the header and such. Thereās an example in the readme.
Ok, so in your opinion which is the better option?
I have a several horizontal stacks and each one I only show if an input_boolean is greater than a certain number. I do this using display: none if the condition is met
Should I (in your opinion)
Continue using horizontal-stack like this (which works well for me):
type: custom:mod-card
style: |
ha-card {
{% raw %}
{% set zone = {% endraw %} {{ zone }} {% raw %} %}
{% set zone_count = states('input_number.irrigation_number_of_zones') %}
{% if (zone_count | int) < (zone | int) %}
display: none
{% else %}
border: 1px solid var(--primary-background-color);
{% endif %}
{% endraw %}
}
card:
type: horizontal-stack
cards:
etc...
Or change to using the style on a custom:stack-in-card? (Iām assuming I can achieve what I want this way, I havenāt actually tried yet.)
I suppose my question boils down to: What is it that is so ābadā about using mod-card?
EDIT: I decided to remove my mod-card and went with option 2. Hopefully youāll tell me if this was the wrong call. But you are pretty insistent that mod-card is the wrong choice.
mod-card in itself is not bad, but to use it where it is not required adds more problems than it solves.
As a bad example (DO NOT DO THIS), I see lots of:
type: custom:mod-card
# AGAIN, THIS IS A BAD EXAMPLE
style: |
ha-card {
--primary-color: red;
# add various workarounds and hoop-jumping caused by unnecessarily using mod-card here
}
card:
type: entities
entities:
...
Your example is actually a good one, using mod-card there makes sense, but using stack-in-card is also a great method which I assume makes your configuration easier too.
You could also use state-switch to avoid the jinja template processing and increase performance a tad.
Thanks, yes I looked at state-switch a while ago but I donāt think I managed to get it to display no card at all, if i remember rightly it was ādisplay one card OR anotherā.
Browser_mod will inject the deviceID in any call-service action from the frontend where it finds deviceID: this.
If you cannot call a service or cannon change its data, then thereās no way for the backend to know which device the action originated from, unfortunately.
I am having problems with browser_mod not seeing my fire 8 tablet while using fully kiosk browser. It will detect the tablet id if I use Chrome browser on the fire 8 tablet, but for some reason I canāt get it to create any id while using fully. The version of Fully I am using is 1.38 Fire. I donāt know if there is settings inside Fully that is preventing browser_mod from working or not. Have tried restarting HA several times, cleared cache, tried local address of HA and duckdns address. I can get browser mod to see my phone and desktop pc and use light and media player on those. Any help would be much appreciated.
That wonāt work, unfortunately, because the disarm service call is run from the backend.
I donāt know of any way to accomplish what you are trying to do. Sorry.