I’ve looked around the board, but couldn’t find an answer. Is the only way to get the weather by using Darksky? I originally opted in setting up WUnderground in HA as it was more accurate for my area. Now that I want to get a dashboard going, I would prefer keeping Wundergroound as my source if possible. I am not opposed to setting up Darksky, but would rather not clutter my setup and having two components fetch weather information.
At the moment only DarkSky is supported but I would like to update the widget to work with other services as well - it’s on my todo list
Maybe now we have the Custom Widget API, someone will write one
Hello, still only darksky? No yr.no or others? Thanks.
included is only darksky.
maybe someone else has created a widget for other weather but i didnt see anyone post it on the forum.
but you always could use all sensor entities that are in HA, only not with the weather widget.
I’ve started to create a custom one for wunderground, by starting I mean in like in the last hour or so. Had a hiccup with my first custom base widget but @ReneTode got me straightened out. Once I have something worthy of others to look at I will post it here. Time-frame unknown…14month old toddler…
are you one or do you take care of one?
Honestly my wife would probably say its a toss up. I like to think I am taking care of him and not the other way around…He’s about old enough to learn python I think…
so in 2 months or so i can ask your son when i get stuck
Anyone have any thoughts on why both monitored conditions set in the wunderground config for pws_temp_f and pws_temp_c both return Fahrenheit values (seen in the related sensors)?
may be a bug with the wunderground component, if I change HA config unit_system to metric from imperial, they are all then Celsius.
@ReneTode @Jiran Made some progress. Image below is wunderground data and formatted like someone mentioned elsewhere that I like better than the darksky widget.
Code is still pretty messy and more parsing than I would like (kinda because of how the wunderground api returns things and the supported conditions from the component).
@ReneTode @Jiran @RagingComputer I put the first test files on github. In order to test things in appdaemon the files need to be added.
- create “custom_widgets” directory on the same level as the appdaemon.yaml file.
- create “basewunderground” directory in the “custom_widgets” directory.
- copy basewunderground.css, basewunderground.js, basewunderground.js files (from the github linked below) into the “basewunderground” directory.
- copy the wunderground.yaml file (from github, up one level from the css, js, html) to the “custom_widgets” directory (not inside the basewunderground directory, but a level above it).
- add the block outlined below to your skin variables.yaml file
- ensure your HA configuration.yaml settings for the wunderground component include the monitored conditions listed below.
Github Repository:
https://github.com/arraylabs/appdaemon/tree/dev/appdaemon/widgets/basewunderground
Content for your skin variables.yaml file (may have have be modified based on your skin):
wunderground_main_style: "color: $orange"
wunderground_unit_style: "color: $orange"
wunderground_sub_style: "color: $blue"
wunderground_widget_style: $background_style
HA configuration.yaml wunderground required monitored conditions (if Celsius is only used the _f items can be omitted, if using Fahrenheit the _c items can be omitted)
temp_f
temp_c
precip_1d
precip_2d
weather
weather_2d
temp_high_1d_f
temp_low_1d_f
temp_high_2d_f
temp_low_2d_f
temp_high_1d_c
temp_low_1d_c
temp_high_2d_c
temp_low_2d_c
Dash file definition:
weather:
widget_type: wunderground
enable_celsius: 0 //use 1 to turn on C
widget_style: $black_background //may depend on your skin
Let me know what kind of issues are encountered as I’m sure I overlooked or missed something.
seems to me that others can work with this.
i have no weather info in my HA and i dont want to use wunderground, but im sure others will find this helpfull.
now that you have learned a bit more you could try to make a more general widget from it.
would be nice if people could configure it themselves with any kind of weather sensors.
in the dsh they then would have to give something like:
temperature: sensor.temp_c
weather: sensorweather
temp_high: sensor.temp_high_1d_f
but for this one some questions:
can it be shown in F and in C based on choice?
why do you need to have F and C temp in HA?
why only F for high and low?
Thanks for the feedback. I can look further into making it more customizable. As far as the high/low being F only, I just missed adding the C portion in the wunderground.yaml and had accounted for it in the js file. Currently will show in F or C, but right now the wunderground component shows them incorrectly meaning all in C or all in F based on HA setting (bug opened). wunderground doesn’t have a generic temp return, they have specific returns as C and/or F. So in monitored conditions either or both could be grabbed (course with the bug they are currently the same).
doesnt make much sense to have them both, and i think very few people will have them both.
most important is that if you have C in HA you probably want C in the dashboard.
but more customisable would be very nice.
1 widget where you could use sensors from any kind of weather platform and even the possibility to mix them up.
if you do create that the think about making the sensors optional.
people might want a weather widget with prediction today and tommorow but without high and/or low for instance.
the more you make customisable the more people will benifit from it.
I’ve tried (unsuccessfully) to add this to my HADashboard.
Not sure where I went wrong - but I couldn’t find the “variables.yaml” file that the instruction said to modify - so I created one in the same directory as appdaemon.yaml.
Can someone help me out please?
In the terminal window, I see:
2017-12-14 10:44:46.453400 INFO Loading custom widget ‘basewunderground’
2017-12-14 10:44:46.455553 INFO Loading custom widget ‘basewunderground.yaml’
2017-12-14 10:44:48.076570 INFO function [get_dashboard] finished in 5331 ms
2017-12-14 10:44:48.323093 INFO New dashboard connected: Home Control Panel
2017-12-14 10:48:55.071503 WARNING Scheduler clock skew detected - delta = 1.3225429058074951 - resetting
2017-12-14 10:48:55.097051 INFO Compiling dashboard ‘main’
2017-12-14 10:48:57.000222 WARNING Unable to find widget type ‘wunderground’
2017-12-14 10:48:57.001990 WARNING Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/appdaemon/dashboard.py”, line 287, in _load_widget
yaml_file, templates = self._do_subs(yaml_path, instantiated_widget, ‘“”’)
File “/usr/local/lib/python3.5/dist-packages/appdaemon/dashboard.py”, line 194, in _do_subs
with open(file, ‘r’) as fd:
FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/local/lib/python3.5/dist-packages/appdaemon/widgets/wunderground.yaml’2017-12-14 10:48:58.607288 INFO Loading custom widget ‘basewunderground’
2017-12-14 10:48:58.609750 INFO Loading custom widget ‘basewunderground.yaml’
2017-12-14 10:49:00.300135 INFO function [get_dashboard] finished in 5229 ms
2017-12-14 10:49:00.307385 INFO Dashboard disconnected
2017-12-14 10:49:00.534709 INFO New dashboard connected: Home Control Panel
variables.yaml is a part from your skin.
it is in custom_css when you use your own skin and when not then it is in the place where appdaemon is installed.
so something like:
python3.4/libs/dist-packages/appdaemon/assets/css/default
I did this last night and it worked beautifully first go, no issues. Thank you.
I don’t know much about coding but have been getting my head around the way HASS is put together and would love to adopt this using BOM Weather for us here in Australia if anyone could shed some light on the basics behind it and I’d like to attempt to transform this.
Hi @lordsiris whilst i have got this working nicely on my HADashboard i noticed when i got home from work last night and through out the night that the information wasnt updating unless i reloaded the page.
Is this a known issue or is there something further i need to do?
Glad you got things working and that my instructions were clear enough. I will take a look at the update issue, I noticed it on mine as well after reading your post yesterday.