Custom hadashboard widgets stopped working after AppDaemon 4 upgrade, fixed by placing quotes around any {{ }} properties

I’m not sure if this is unique to me, but after upgrading to AppDaemon 4.0 I was getting errors that looked like this on any hadashboard custom widgets:

living_room_lights: Error in widget definition '%s':
living_room_lights: parser says
living_room_lights: in "", line 2, column 10: entity: {{entity}} ^
living_room_lights: found unhashable key while constructing a mapping

I was able to fix this by placing any yaml entries enclosed in double curly braces in quotes, ie changing:

entity: {{entity}}

to

entity: "{{entity}}"

Posting this in case it’s helpful to anyone else, if this isn’t unique to me (not sure why it would be) then the custom widget creation documentation needs to be updated to reflect this: https://appdaemon.readthedocs.io/en/latest/WIDGETDEV.html

2 Likes

Thank you so much for sharing this! I faced this exact problem after upgrading to AD 4.0. You really saved a lot of time for me!

I second aarvish I thought everything blew up after upgrading since the config file needed changes I would have to rewrite all my custom widgets but this fixed it like a charm.

thanks you… you slove my problem now i can upgrade to version 4