đŸ”č Browser_mod - turn your browser into a controllable device, and a media_player

Sorted - thanks

{{ is_state_attr('sensor.7d8111b8_a8211111', 'path', '/lovelace/6') }}

I am still struggling with the device id displayed in fully kiosk browser being different to the device id for it shown in Home Assistant. When I clear the cache on fully kiosk browser the device id changes within Home Assistant. Does anyone else have this problem?

1 Like

Is there a way to have a popup card close automatically after seconds of no activity.

Use case is I’m using popup-light-card to dim lights, if the popup is left open and there’s been no activity on the popup I’d like to automatically close it.

Thanks!

Sure, check the documentation about popups: :slight_smile:

Thanks, I read the docs, but no. The time parameter pops up a card after a set time, which is cool, but not what I’m trying to do. I’m trying to close a popped up card after seconds of no mouse/tap activity. Here’s the config I tried:

                        action: call-service
                        service: browser_mod.popup
                        service_data:
                          title: Popup
                          deviceID: this
                          auto_close: true
                          time: 1

Also, using auto_close is the opposite of what I’m trying to achieve.

There’s no way of acomplishing this with browser_mod alone. You can send a browser_mod.close_popup command from the backend after a set time, and keep track of interactions some other way.

I working on a PR right now. Something such as autoclose_popup_card: <time>. Doesn’t seem too hard
 but I’m less experienced at JS.

this is a great mod! at least I can see the potential for my use case.

I’d like to play a sound on all the clients that are connected to HA lovelace (with browser_mod running) using the HA REST API

At the moment I have:
curl -X POST -H “Authorization: Bearer xxxxx” -H “Content-Type: application/json” -d “{“entity_id”: “media_player.xxxxxxxxxxxxxx”}” http://xxx.xxx.xxx.xxx:8123/api/services/media_player/media_play

which works great for 1 single connected client.

How can I, with a single http request, play a sound on all clients that are connected?

To target all media players, use all .

Hello, thank you again for this amazing component.

Recently, after upgrading from 109 to 112, my Chrome browser on Mac (I’ve tested this with firefox as well) has to be refreshed manually every time HA is restarted in order for the browser_mod entities to show up. This issue doesn’t occur on my 2 fire tablets running Fully Kiosk browser - the browser_mod entities are there after HA restart, without issue.

Any ideas why the refresh is suddenly required?

Browser_mod was PERFECTLY before the upgrade (and still is other than that 1 issue)

Thanks!

Has something changed because now I am getting no radius on the top part.

image

tap_action:
  action: call-service
  service: browser_mod.popup
  service_data:
    title: >
      [[[
        var entity_id = 'input_text.irrigation_cycle{{ cycle }}_name';
        return states[entity_id].state.toUpperCase() + ' SCHEDULE';
      ]]]
    card:
      type: custom:time-picker-card
      entity: input_datetime.irrigation_cycle{{ cycle }}_start_time
      name: Start Time
      layout:
        name: inside
      style: >
        ha-card {
          border-radius: 0em 0em 1em 1em
        }
    deviceID:
      - this
    style:
      font-family: >
        [[[
          return states['input_text.irrigation_ui_font_family'].state
        ]]]
      box-shadow: 0em 0em 0.5em
      border-radius: 1em
      opacity: 0.9

Try adding overflow: hidden

Thanks, that did it.

EDIT Ignore this. Obviously this can be achieved with hui-element and conditional cards.
:blush:


Another question but I might have reached the limits of what is possible?
(And also this might actually be a lovelace_gen issue?)

I have a popup with an input_select.

I want to display different entities in the popup based on the state of the input select.

I can do that and it works well but I really need to also base those entities on a passed variable. That is the part I cannot get working.

Everything displays correctly until I use a passed variable then the popup doesn’t change what is shown when I change the selection in the input select. If I hard code the variable, it works.

(And obviously next time I open the popup it is correct, it is just not dynamic).

Is this possible to achieve?

Thanks


Here is the relevant code:

- entity: input_number.irrigation_cycle{{ cycle }}_start_time_sunrise_offset
  name: Offset in minutes
  style: >
    :host {
      {% raw %}
      {% set cycle = {% endraw %} {{ cycle }} {% raw %} %}
      {% set type = states('input_select.irrigation_cycle' ~ cycle ~ '_start_time_type') %}
      {% if type != 'Sunrise Offset' %}
        display: none;
      {% endif %}
      {% endraw %}
    }

For reference here is the code that works:

- entity: input_number.irrigation_cycle1_start_time_sunrise_offset
  name: Offset in minutes
  style: >
    :host {
      {% raw %}
      {% set type = states('input_select.irrigation_cycle1_start_time_type') %}
      {% if type != 'Sunrise Offset' %}
        display: none;
      {% endif %}
      {% endraw %}
    }

Hi, I think this may have been addressed in the past, but, I was unable to find a solution. Trying to trigger a markdown card in an automation as follows – it pulls up, but I get a red card with error “Custom element doesn’t exist: hui-markdown-card”

I’m on HA 0.112.4, Browser_mod: release 29. Trying to pull up on recent android tablet and I have deleted my cache.

    - service: browser_mod.popup
        data:
          title: Weather Alert
          large: true
          card:
            type: markdown
            content: >
              **Severity:** {{ state_attr('sensor.nws_alert_event','features')[0]['properties'].severity }}
              **Expires:** {{ as_timestamp(state_attr('sensor.nws_alert_event','features')[0].properties.expires)| timestamp_custom('%-I:%M %p on %-m/%-d/%Y') }}
              
              {{ state_attr('sensor.nws_alert_event','features')[0]['properties'].description }}
          deviceID:
            - XXXX

Any help much appreciated, thanks

1 Like

Hello, anybody is having problems with dialogs with browser_mod not working under Win10, but working under Win7, Android?
I have integrated a dashboard that uses lots of browser_mod dialogs but none of them work under Win10/Firefox

Hi all, anyone having problems (or not having problems) with popups on .112.4 and latest browser mod? Mine were working fine but suddenly don’t work any more, no changes other than versions.

1 Like

Hi @scstraus my popups were working fine in 0.112.4, both the more-info and call-service popups, but since upgrading to 0.113.0b0 to test they’ve all stopped working.

Interesting. Mine all have stopped working including more-info and popup. Debug works however. I have opened an issue on the github page if you want to share your experience

Confirming for me it is definitely an issue with 0.113.0b0, I rolled back to 0.112.4 and all popups are working again.