Custom Widgets in HADashboard?

Hey all,
I’ve been away for a while moving house… I wondered, has any progress been made enabling custom widgets? I’m keen to try and create a landscape alarm widget that will fit on the Raspberry Pi touch screen…
Thanks!
Justin

Yep - it went in about 3 weeks ago :slight_smile:

Check the docs:

http://appdaemon.readthedocs.io/en/latest/WIDGETDEV.html

1 Like

Amazing stuff - thanks!

Do you know if it works in the Hass.IO version? I have the dashboard up and running using vkorns addon but would like to change the weather widget. I’ve tried adding the modified weather widget to my “custom_widgets” folder. However I keep getting the widget cannot be found error in the logs.

what files did you add, and how did you change them?

I copied the weather yaml and baseweather folder into the new “custom_widgets” directory. I just modified the HTML file in the base wether folder. I had previously used it on another instance of HA using the AIO and the modifications show on the dashboard without any issue. That is still primarily what I’m using for my HA instance but wanted to try out HASS.IO and see if I could get everything working there.

what is exactly in the logs?
when you just copied the files and it could find the widget_type before you copied them, it should still be able to find them after you copied them.

I just started playing around with HASS.IO again to see if I can get my current HA setup working in it. I’m still running until the issue where the dashboard isn’t recognizing the custom widgets folder. I created the custom_widgets folder in the “appdaemon” folder in HASS.IO. When I try and use any of the custom widgets they don’t work and get a file not found message in the logs. Is there something special to get it to recognize the custom_widgets & custom_css folders?

2018-03-16 18:11:42.573098 WARNING Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/appdaemon/dashboard.py”, line 301, in _load_widget
yaml_file, templates = self._do_subs(yaml_path, instantiated_widget, ‘“”’)
File “/usr/lib/python3.6/site-packages/appdaemon/dashboard.py”, line 208, in _do_subs
with open(file, ‘r’) as fd:
FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/lib/python3.6/site-packages/appdaemon/widgets/countdown.yaml’

do you have appdaemon and the dashboards running without custom widgets?
which version?
which widget do you try to use that has an error?
where did you create the folders? and what did you put into it?

Yes, appdaemon and HADashboard are running and I can pull up a dashboard and use any of the widgets that come with it. I’m currently using the latest Hass.io and the AppDaemon3 v0.3.0 add-on.

I created the “custom_widgets” folder under “\config\appdaemon”. I copied over my countdown widget that works great it my other non Hass,io HA instance. It’s a slightly modified version of the label widget. In the custom_widgets folder I placed the yaml file and the corresponding widget folder with the CSS,html and JS files.

do you have the latest addon installed?

what is in your logfiles (from the start)
did you restart everything. (close everything also all dashboards, then restart the hassio device, and only when everything is running open a dashboard)
open the dashboard in google chrome and also look in the java console for errors.

the custom_widgets must be in the same folder/dir as your appdaemon.yaml is.

In the logs it was showing I was running the latest version of the add-on. I did restart everything but that didn’t seem to do anything. I just uninstalled the add-on and re-installed it and that did the trick, it’s now picking up the custom_widgets folder. Thanks for your help!

1 Like