Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.0 clashed with Button Card integration #358

Closed
4 tasks done
thomasmaxson opened this issue Sep 3, 2022 · 9 comments
Closed
4 tasks done

Version 2.0 clashed with Button Card integration #358

thomasmaxson opened this issue Sep 3, 2022 · 9 comments
Labels

Comments

@thomasmaxson
Copy link

thomasmaxson commented Sep 3, 2022

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:

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

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

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

  • 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.

@thomasloven
Copy link
Owner

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

@herveaurel

This comment was marked as off-topic.

@n00bcodr

This comment was marked as off-topic.

@n00bcodr
Copy link

n00bcodr commented Sep 3, 2022

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

@thomasmaxson
Copy link
Author

thomasmaxson commented Sep 3, 2022

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]

@RedFoxy
Copy link

RedFoxy commented Sep 7, 2022

Same here

@thomasmaxson
Copy link
Author

thomasmaxson commented Sep 14, 2022

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]

@RedFoxy
Copy link

RedFoxy commented Sep 15, 2022

Thanks I fix it, sorry to bother you :P

@stale
Copy link

stale bot commented Nov 19, 2022

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 stale bot added the stale label Nov 19, 2022
@stale stale bot closed this as completed Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants