šŸ”¹ Browser_mod - turn your browser into a controllable device, and a media_player

If you read the post before yours you will find the answer

1 Like

+1
I read lots of people having problems here whith custom cards not supporting new version
I advise to not update to latest version then, since there are so many problems with it?
@thomasloven: is there any reason why you pushed this new version forward, knowing custom cards will have problems with lots of people?

The reason and all the breaking changes are explained on the changelog in HACS and github.

Also, this change will make sure that browser_mod does not break Home Assistant 2021.3.0 (sic!).

Itā€™s a shame people donā€™t read all the changes before pressing update. There is a button called ā€˜changelogā€™ in HACS. And shame people donā€™t take 2 minutes of their time to read the thread and other peoples comments before coming here and posting pop-up cards donā€™t work.

There is NO reason to update right now. Everything will work fine without hitting that update button. Just wait for RomRider and others to update their cards and then update. Also when HA 2021.3 is released (which older browser_mod will break) you can still just wait. Not updating the latest version will not suddenly break your current setup if you just leave everything the way it is for a little longer.

6 Likes

For people using button-card, RomRider has just updated his card :smiley:

fire-dom-action should now work with any custom:button-card action (tap, hold, doubletap)

thank you.
Iā€™ve added onto it.

Hi,

I noticed two interesting errors since yesterday:

Logger: homeassistant
Source: helpers/entity.py:268
First occurred: 17. Februar 2021, 19:28:35 (1 occurrences)
Last logged: 17. Februar 2021, 19:28:35

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 268, in async_update_ha_state
    raise RuntimeError(f"Attribute hass is None for {self}")
RuntimeError: Attribute hass is None for <Entity None: 1>

and then

Logger: homeassistant.components.websocket_api.http.connection
Source: helpers/entity.py:422
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 17. Februar 2021, 19:28:35 (4718 occurrences)
Last logged: 8:17:49

[1708808248] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update
    devices[deviceID].update(msg.get("data", None))
  File "/config/custom_components/browser_mod/connection.py", line 89, in update
    self.sensor.data = data.get('browser')
  File "/config/custom_components/browser_mod/helpers.py", line 106, in data
    self.updated()
  File "/config/custom_components/browser_mod/sensor.py", line 27, in updated
    self.schedule_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 422, in schedule_update_ha_state
    assert self.hass is not None
AssertionError

Obviously every minute.
Who can tell me, what I should look for.
Iā€™m on 2021.1.4 and on the latest browser_mod.
I use it only for popup cards, configured in the lovelace yaml and as alarm clock - so play a media file at a given time
everything seem to work so far.

Nice to hear button card has the update.
I still got a question though
i got this:

name: Alarm
        type: custom:button-card
        tap_action: !include popup/alarm.yaml
        entity: alarm_control_panel.risco

and then the popup starts with

action: call-service
service: browser_mod.popup
service_data:
  title: Alarm
  hide_header: true
  deviceID: this
  style:
    .: |
      :host .content {
        width: calc(400px);
      }
    $: |
      .mdc-dialog .mdc-dialog__container .mdc-dialog__surface {
        background: none !important;
      }
  card:
    type: alarm-panel
    entity: alarm_control_panel.risco
etc etc

Does the button card needs the update there, or the alarm panel card ?

Youā€™re envoking the popup using a button-card tap_action. So you need to update button-card tap_action. Alarm Card does not open the popup, itā€™s part of the popup itself.

Hy i update butto-card today but all my user interface is againg broken. When i tap ho button card the pop up not open. Someone can help me please.
This is an example:

            - type: 'custom:button-card'
              entity: alarm_control_panel.ksenia_bticino_bt_4000_16ip
              tap_action:
                action: fire-dom-event
                browser_mod:
                  command: popup
                  title: 'My Title'
                  card:
                      type: 'custom:mini-graph-card'
                      entities:
                        - sensor.temeperatura_18

try this in your alarm.yaml

1 Like

mapping values are not allowed in line 3

please post your code so that we can see where the error is

action: fire-dom-event
browser_mod:
command: popup
  title: Alarm
  hide_header: true
  deviceID: this
  style:
    .: |
      :host .content {
        width: calc(400px);
      }
    $: |
      .mdc-dialog .mdc-dialog__container .mdc-dialog__surface {
        background: none !important;
      }
  card:
    type: alarm-panel
    entity: alarm_control_panel.risco
    states:
      - arm_home
      - arm_away

See here

2 Likes

Yes! Working thx mate !

Yay, looks like browser_mod popups are working with custom:button-card now with the new update :slight_smile:

Hello!

First of all. Thank you for the great mod. Now to my Problem. I tried to find a solution but I didnt find anything:
For me the X of close button is not aligned with the button itself. So I just want to ask if there is a fix for this to make it aligned in every popup window.

grafik

Can someone tell me how to uninstall browser mod correctly?

  • I unstalled it from integrations
  • I removed it from configuration.yaml
  • I deleted it from the folder custom components
  • I deleted it from hacs
  • I searched in entitites, all are gone

I still got many errors, they are flooding my logs!:

ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139683299554112] Received invalid command: browser_mod/update

1 Like

about the popup and other services, do you know that itā€™s impossible to call any services as popup, toast, command from the devepoler tools page? So in this way itā€™s impossible to call the services in any other part of lovelace! Moreover the popups are solved only for button and button custom card, but if you need to call a popup in any other card (like entities) clicking on entity is impossible, so the call-service doesnā€™t work anymore!

I have the same problem here, so very interrested how to solve that.