cytech/ Home-Assistant-wundergroundpws
Not working on Dec 27, 2020
The API they are calling is the old one (http://api.wunderground.com/api/…) not the one listed on the API doc (https://api.weather.com/v2/pws/observations/current…)
Also if you are using a RaspberryPi the
conf_file = config.get_default_config_dir() + '/configuration.yaml'
returns the wrong configuration directory.
I hardcoded the correct configuration directory, and was able to get the yaml file to pass configuration check, and the Sensor did appear on the Lovelace dashboard, with errors on each sensor. LOG showed errors on the URL
Testing the URL that was being called in curl (replace {API KEY} with your key to try)
curl -X get "http://api.wunderground.com/api/{API KEY}/alerts/almanac/conditions/forecast/lang:EN/q/pws:ys0w889H.json"
results in
Service Unavailable
New API URL
curl -X get "https://api.weather.com/v2/pws/observations/current?stationId=KVAROUND44&format=json&units=e&apiKey={API KEY}"
returns
{
"observations": [
{
"country": "US",
"epoch": 1609089409,
"humidity": 42,
"imperial": {
"dewpt": 20,
"elev": 561,
"heatIndex": 41,
"precipRate": 0.0,
"precipTotal": 0.0,
"pressure": 30.53,
"temp": 41,
"windChill": 41,
"windGust": 3,
"windSpeed": 3
},
"lat": 39.14,
"lon": -77.761,
"neighborhood": "Round Hill",
"obsTimeLocal": "2020-12-27 12:16:49",
"obsTimeUtc": "2020-12-27T17:16:49Z",
"qcStatus": 0,
"realtimeFrequency": null,
"softwareType": "vws versionxx",
"solarRadiation": null,
"stationID": "KVAROUND44",
"uv": 0.0,
"winddir": 112
}
]
}