Is anyone doing anything with weather underground

I plan on using this, just haven’t gotten to it yet, thanks!

Now I see what you mean - above the entries I supplied put the following:

-  platform: template
   sensors:

So that it looks like this:

-  platform: template
   sensors:
     pws_stationid:
       value_template: '{{ states.sensor.weather_underground_pws.attributes.station_id }}'
     pws_location:
       value_template: '{{ states.sensor.weather_underground_pws.attributes.display_location.full }}'
     pws_elevation:
       value_template: '{{ states.sensor.weather_underground_pws.attributes.observation_location.elevation }}'
and so on...

I forgot to take into account people who don’t already have sensor templates!! I’m sorry about that, Taubin!!

EDIT: I just updated the sensor_templates.yaml file to include this with a statement for people who already are using sensor templates in their setup. My apologies again for missing this!

2 Likes

Thank you very much for that!

Did that fix it for you?

I haven’t had a chance to test it out, but it makes more sense to me looking at it. I’ll try it out and report back. Cheers.

Now I know that this is probably a weird question, but…
Can this be set up to show what the weather was a few hours ago?

No, but if you use the forecast.io platform or OWM and click on any of the sensors, they will show you history.

Sorry, my bad. Let me rephrase my question:

Can the current sensor value display what the temperature was a few hours ago?

Did we figure out the update issue?

I haven’t heard anything from @kellbot on the subject, nor do I see any updates on Git.

I have an update to fix the missing UV index data. In the sensor template for the UV sensor, change the case from

pws_uv:
   value_template: '{{ states.sensor.weather_underground_pws.attributes.uv }}'

to:

pws_uv:
   value_template: '{{ states.sensor.weather_underground_pws.attributes.UV }}'

Sorry I missed that!

Has anybody figured out the update/refresh issue? @kellbot seems to be MIA and this is the only thing holding this platform up from being outstanding.

No luck on my end. At first I thought it was just grabbing cached data, so I commented out the throttle code, but that made no difference. I may have to rewrite the whole thing and test each stage to see if it updates. I just don’t understand HA enough to do any real troubleshooting. I just need a way to see what this module is doing via logs or something else…

I wish I could offer some help but my Python knowledge is very basic. I wonder if the problem was somewhere here:

from datetime import timedelta

CONF_PWS_ID = 'pws_id'
_RESOURCE = 'http://api.wunderground.com/api/'

# Return cached results if last scan was less then this time ago.
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=300)

in the use of timedelta?

Yeah, I commented out both the from datetime and the variable MIN_TIME_BETWEEN_UPDATES lines among others when i was referring to the throttle code… no luck yet :confused:

1 Like

Thanks to @kellbot for all the work…I was able to update the sensor. Created a new thread in share your project.

Nicely done @arsaboo! Thanks everyone else who made this happen!

Thanks for getting the updates to work @arsaboo! I’ve posted underneath your new post with the pictures, instructions and the updated YAML files, so you can edit your post to remove the link (it was pointing to the older files anyway).

I merged @arsaboo’s changes into my version of the repo as well, so anyone who’s on mine can just git pull origin master to get the fixed code. Thanks for picking up the pieces everyone!

Cool…will work on it to improve how the sensors are added and only the relevant details are saved.