tjntomas / HADashboard-widgets

Widgets for HADashboard / Appdaemon
MIT License
52 stars 26 forks source link

camerastream widget doesn't work on appdaemon4? #13

Closed fribse closed 4 years ago

fribse commented 4 years ago

Hi @tjntomas Thankyou for this great widget. I've had to move to appdaemon4 to get controllerx running. But that made the widget fail with this message:

HA: 0.105.3 AppDaemon4 (0.1.2) WallPanel (by thanksmister)

    frontdoor: Error in widget definition '%s':
    frontdoor: parser says
    frontdoor: in "", line 2, column 10: entity: {{entity}} ^
    frontdoor: found unhashable key while constructing a mapping
tjntomas commented 4 years ago

Yes, a change in the yaml parser requires a change in the .yaml file.

Please edit your camerastream.yaml file to as per below:


widget_type: basecamerastream
entity: "{{entity}}"
fields:
  title: ""
  base_url: ""
  image_style: ""

  img_internal_src: ""
  img_internal_style: ""
icons: []
static_css:
  title_style: $style_title
  widget_style: $background_style
css: []
static_icons: []

and the widget should work fine with AD4.
Then empty the browser cache. CTRL + F5 for Chrome should do the trick.

The change is to add double quotes around any {{something}}, which should now be enclosed in quotes, thus "{{something}}".

Same for any other custom widget.

tjntomas commented 4 years ago

I have now updated the repo to work with AD4

fribse commented 4 years ago

It works like a charm, thankyou!