hass-browser_mod icon indicating copy to clipboard operation
hass-browser_mod copied to clipboard

Version 2.0 clashed with Button Card integration

Open thomasmaxson opened this issue 2 years ago • 8 comments

My Home Assistant version: 2022.8.7

What I am doing: Using YAML configuration to open popups for my dashboard

What I expected to happen: Popups to launch

What happened instead: Receiving console errors that prevent the popup from launching

Error messages from the browser console: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'startsWith') at Ue._service_action (browser_mod.js:66:17482) at HTMLBodyElement. (browser_mod.js:66:17325) at It (button-card.js:1:27865) at Gt (button-card.js:1:31754) at Je._handleTap (button-card.js:547:4619) at Je._handleAction (button-card.js:547:4488) at N.handleEvent (button-card.js:1:9239) at N.__boundHandleEvent (button-card.js:1:8618) at Xt (button-card.js:1:34317) at button-card.js:1:37920


By replacing the space in the checkboxes ([ ]) with an X below, I indicate that I:

  • [X] Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).

  • [X] Have made sure I am using the latest version of the plugin.

  • [X] Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.

  • [X] Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.

thomasmaxson avatar Sep 03 '22 13:09 thomasmaxson

Please include the code you are using to open the popup.

thomasloven avatar Sep 03 '22 14:09 thomasloven

Hello, since the update, the popups open but the integration displays this:

Capture d’écran 2022-09-03 à 17 06 55

Logger: homeassistant.config_entries Source: config_entries.py:349 First occurred: 17:01:45 (1 occurrences) Last logged: 17:01:45

Migration handler not found for entry Browser Mod for browser_mod

herveaurel avatar Sep 03 '22 15:09 herveaurel

Hello, since the update, the popups open but the integration displays this:

Capture d’écran 2022-09-03 à 17 06 55

Logger: homeassistant.config_entries Source: config_entries.py:349 First occurred: 17:01:45 (1 occurrences) Last logged: 17:01:45

Migration handler not found for entry Browser Mod for browser_mod

@herveaurel refer https://github.com/thomasloven/hass-browser_mod/issues/356 You have to completely remove the existing browsermod integration

n00bcodr avatar Sep 03 '22 15:09 n00bcodr

@thomasmaxson I hope you have made changes to your yaml, the code which works for browser mod v1 might not work with v2.

n00bcodr avatar Sep 03 '22 15:09 n00bcodr

Original code is as follows:

action: fire-dom-event
browser_mod:
  command: popup
  title: Laundry Status
  card:
    type: [card details here]

New code:

action: fire-dom-event
browser_mod:
  service: browser_mod.popup
  data:
    browser_id: THIS
    title: Laundry Status
    content:
      type: [card details here]

thomasmaxson avatar Sep 03 '22 18:09 thomasmaxson

Same here

RedFoxy avatar Sep 07 '22 18:09 RedFoxy

Returning with my solution for anyone else who is lost on getting the new structure to work.

Got this working with the following code:

action: fire-dom-event
browser_mod:
  command: popup
  service: browser_mod.popup
  data:
    title: Laundry Status
    content:
      type: [card details here]

thomasmaxson avatar Sep 14 '22 22:09 thomasmaxson

Thanks I fix it, sorry to bother you :P

RedFoxy avatar Sep 15 '22 08:09 RedFoxy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 19 '22 16:11 stale[bot]