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

Issues with 0.106 #61

Closed
VDRainer opened this issue Feb 22, 2020 · 4 comments
Closed

Issues with 0.106 #61

VDRainer opened this issue Feb 22, 2020 · 4 comments

Comments

@VDRainer
Copy link

Not sure where to report this, but errors are shown from browser_mod.

I'm using browser_mod to show different popups at a picture-entity

          - type: picture-entity
            entity: camera.warnungen
            show_name: false
            show_state: false
            tap_action:
              action: call-service
              service: browser_mod.popup
              service_data:
                title: "DWD Wetterwarnung \U000026A0"
                style:
                  border-radius: 15px
                  width: 600px
                card: 
                  type: markdown
                  content: |
                    TEST
                deviceID:
                  - this
            hold_action:
              action: call-service
              service: browser_mod.command
              service_data:
                command: more-info
                entity_id: camera.warnungen
                #large: true
                deviceID:
                  - this
            double_tap_action:
              action: call-service
              service: browser_mod.command
              service_data:
                command: more-info
                entity_id: sensor.dwd_weather_warnings_current_warning_level
                #large: true
                deviceID:
                  - this

Since 0.106.0b any of the tap actions doesn't work
Auswahl_281
For testing i tried an entity-button instead of the picture-entity, same behavior.

          - type: entity-button
            entity: sensor.dwd_warn_count
          # - type: picture-entity
          #   entity: camera.warnungen
          #   show_name: false
          #   show_state: false

After replacing the entity-button with a custom:button card,

          - type: custom:button-card
            entity: sensor.dwd_warn_count
          # - type: picture-entity

the browser_mod errors are gone, but the popup shows an error about the markdown card.
Auswahl_282
hold_action and double_tap_action show the expected more-infos from the camera and the sensor.

After leaving the console, changing to another tab and go back, the popup shows the the expected markdown.
Auswahl_285

Browser_mod reinstalled multiple times, card-tools and card mod installed manually.

  - url: /local/card-tools.js?v=2.1.1
    type: module
#  - url: /community_plugin/lovelace-card-tools/card-tools.js
#    type: module
  - url: /local/card-mod.js?v=13
    type: module
  # - url: /community_plugin/lovelace-card-mod/card-mod.js
  #   type: module
@VDRainer
Copy link
Author

Looks like the red card issue is found.
home-assistant/frontend#4984
Issue with browser_mod.js:60:252 TypeError: 0 is read-only on opening a popup still persists.
Could this be related?

@VDRainer VDRainer changed the title Issues with beta 0.106 Issues with 0.106 Feb 27, 2020
@afxefx
Copy link

afxefx commented Feb 28, 2020

Thomas, here's where the error is occurring in the code. Hoping it'll save you some time in debugging it.

Screen Shot 2020-02-27 at 7 59 44 PM

@gadgetchnnel
Copy link
Contributor

It looks like this is the same issue affecting cards in 0.106, where the config is read-only.
The code here patches the callService method in hass so that, if the deviceID property in the service data is "this", it is updated to be the current device id.
Since the service data comes from the config of a card (e.g. a card with a tap action which displays a popup) this is presumably readonly and this is failing.
The solution would presumably be to clone the service data in the same way as for cards.

This may also be the reason for this issue where the deviceID kept changing from "this" to one of their device ids since in 0.105, before 0.106 made the config readonly, changing properties of the config object could overwrite the actual config of the card.

@VDRainer
Copy link
Author

VDRainer commented Mar 4, 2020

Closing this issue as #63 (comment) fixes it for me and one is enough, i think.

@VDRainer VDRainer closed this as completed Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants