That looks ok. It seems like maybe HA isn’t sending the correct URL still. If you change one of the sensors back to .imperial. does it pick up that one value? If so that would confirm that theory.
With imperial, everithing is ok…
Hi
Same issue here, Imperial works fine metric says unavailable.
But, sensor.pws.report shows values under metric, and the values looks correct for metric. I.E temp: 8
url changed units=m
/Niclas
Same here. I select imperial but temperature is shown in metric (deg C)…
How do I change from Wind Degree to Direction? IE: Instead of 269 degrees show North or N.
Here is a template someone posted:
https://community.home-assistant.io/t/yet-another-wind-compass-with-wind-speed-indication/144547/13?u=emphyrio
This broke because of the split in sensor between the letters and degrees. Thanks for reminding me to update it
God news! Everything is working now!
This is my call to Wunderground from secrets.yaml:
wunderground_url: https://api.weather.com/v2/pws/observations/current?stationId=XXXX&numericPrecision=decimal&format=json&units=m&apiKey=yourApiKey
(I added “numericPrecision=decimal”, because I ned decimal point precision (eg. 14.7 degC) and changed units to metric (units=m) )
Then i added this in configuration.yaml:
sensor:
#WUNDERGROUND_REST
- platform: rest
name: pws_report
json_attributes:
- observations
value_template: '{{ value_json["observations"][0]["obsTimeLocal"].title() }}'
resource: !secret wunderground_url
scan_interval: 300
- platform: template
sensors:
pws_station_id:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].stationID }}'
friendly_name: Station ID
pws_obs_local:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].obsTimeLocal }}'
friendly_name: Time Local
pws_wind_dir:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].winddir }}'
friendly_name: Wind Direction
unit_of_measurement: "°"
pws_humidity:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].humidity }}'
friendly_name: Humidity
unit_of_measurement: "rH%"
pws_temp:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.temp }}'
friendly_name: Temperature
unit_of_measurement: "°C"
pws_heat_index:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.heatIndex }}'
friendly_name: Heat Index
unit_of_measurement: "°C"
pws_dewpt:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.dewpt }}'
friendly_name: Dew Point
unit_of_measurement: "°C"
pws_windchill:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.windChill }}'
friendly_name: Wind Chill
unit_of_measurement: "°C"
pws_wind_speed:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.windSpeed }}'
friendly_name: Wind Speed
unit_of_measurement: "Km/h"
pws_wind_gust:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.windGust }}'
friendly_name: Wind Gust
unit_of_measurement: "Km/h"
pws_pressure:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.pressure }}'
friendly_name: Pressure
unit_of_measurement: "hPa"
pws_precip_rate:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.precipRate }}'
friendly_name: Rain Rate
unit_of_measurement: "L/h"
pws_precip_total:
value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.precipTotal }}'
friendly_name: Rain Total
unit_of_measurement: "L"
(I stripped, in configuration.yaml, what i don’t need from pws_report )
Hi, i have an Ventus W830 and i am uploading to Ecowitt.net and Weather Underground. My preferred way would be capture data to my pi, and then integrate in HA but, pulling the data from ecowitt or WU is fine by me. What would be the best approach here? Want to have a list of read time readings in ha app.
Regards
Eelco
Yes i could use some assistance since the status of the formal integration is unclear also regarding this document: https://github.com/cytech/Home-Assistant-wundergroundpws
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
}
]
}
See my post from 25 nov…
hi, i also habe the w830 - I upload the data directly to HA using this HACS https://github.com/garbled1/homeassistant_ecowitt
In parallel you can upload also to WU or anything else.
The HA_Ecowitt integration works wonderful!
Thanks, indeed the ecowitt integration works great!
It is a bit of work, to change the docker, with hacks and then add the integration, but … i am quite happy with it.
Thank You @paulrafu I did miss it.
- added the URL to secret (with the API key)
- in the URL change to be my specifics
stationid
apiKey - copied the config information into the configuration.yaml
- combined all sensor: into one definition.
Thank You for pointing me back to the post. I see sensors on the automatic Lovelace page with the readings…
how can i access the forecast data with the rest API?
I will try to figure this out. It is a different URL, documentation is at
https://docs.google.com/document/d/1_Zte7-SdOjnzBttb1-Y9e0Wgl0_3tah9dSwXUyEA3-c/edit#
If you are in the USA, then this would be the API Call
https://api.weather.com/v3/wx/forecast/daily/5day?postalKey=81657:US&units=e&language=en-US&format=json&apiKey=yourApiKey
it responds in JSON and How that gets into HASS is a BIG learning gap for me, but, until someone else more knowledgeable jumps in, let me have a look.
{"dayOfWeek":["Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"expirationTimeUtc":[1612305036,1612305036,1612305036,1612305036,1612305036,1612305036],"moonPhase":["Waning Gibbous","Waning Gibbous","Last Quarter","Waning Crescent","Waning Crescent","Waning Crescent"],"moonPhaseCode":["WNG","WNG","LQ","WNC","WNC","WNC"],"moonPhaseDay":[20,21,22,23,24,25],"moonriseTimeLocal":["2021-02-02T23:10:24-0500","","2021-02-04T00:21:27-0500","2021-02-05T01:32:34-0500","2021-02-06T02:44:38-0500","2021-02-07T03:54:01-0500"],"moonriseTimeUtc":[1612325424,null,1612416087,1612506754,1612597478,1612688041],"moonsetTimeLocal":["2021-02-02T10:18:29-0500","2021-02-03T10:47:41-0500","2021-02-04T11:18:47-0500","2021-02-05T11:54:34-0500","2021-02-06T12:36:26-0500","2021-02-07T13:24:59-0500"],"moonsetTimeUtc":[1612279109,1612367261,1612455527,1612544074,1612632986,1612722299],"narrative":["Chance of snow showers early. Lows overnight in the upper 20s.","Partly cloudy. Highs in the upper 30s and lows in the low 20s.","A few clouds. Highs in the mid 40s and lows in the low 30s.","Showers ending by midday. Highs in the low 50s and lows in the low 20s.","Mostly sunny. Highs in the low 40s and lows in the mid 20s.","Mix of rain and snow showers. Highs in the mid 30s and lows in the upper teens."],"qpf":[0.02,0.0,0.16,0.06,0.0,0.14],"qpfSnow":[0.2,0.0,0.0,0.0,0.0,1.2],"sunriseTimeLocal":["2021-02-02T07:16:17-0500","2021-02-03T07:15:21-0500","2021-02-04T07:14:22-0500","2021-02-05T07:13:23-0500","2021-02-06T07:12:22-0500","2021-02-07T07:11:19-0500"],"sunriseTimeUtc":[1612268177,1612354521,1612440862,1612527203,1612613542,1612699879],"sunsetTimeLocal":["2021-02-02T17:33:28-0500","2021-02-03T17:34:38-0500","2021-02-04T17:35:49-0500","2021-02-05T17:36:59-0500","2021-02-06T17:38:09-0500","2021-02-07T17:39:20-0500"],"sunsetTimeUtc":[1612305208,1612391678,1612478149,1612564619,1612651089,1612737560],"temperatureMax":[null,38,45,50,41,35],"temperatureMin":[27,22,32,24,25,18],"validTimeLocal":["2021-02-02T07:00:00-0500","2021-02-03T07:00:00-0500","2021-02-04T07:00:00-0500","2021-02-05T07:00:00-0500","2021-02-06T07:00:00-0500","2021-02-07T07:00:00-0500"],"validTimeUtc":[1612267200,1612353600,1612440000,1612526400,1612612800,1612699200],"daypart":[{"cloudCover":[null,90,25,3,20,94,63,19,27,46,73,30],"dayOrNight":[null,"N","D","N","D","N","D","N","D","N","D","N"],"daypartName":[null,"Tonight","Tomorrow","Tomorrow night","Thursday","Thursday night","Friday","Friday night","Saturday","Saturday night","Sunday","Sunday night"],"iconCode":[null,46,30,31,34,12,39,33,34,29,5,29],"iconCodeExtend":[null,6800,3000,3100,3400,1200,6103,3300,3400,2900,4900,2900],"narrative":[null,"Mainly cloudy with snow showers around this evening. Low 27F. Winds NW at 15 to 25 mph. Chance of snow 50%. Higher wind gusts possible.","Some clouds in the morning will give way to mainly sunny skies for the afternoon. High 38F. Winds NW at 15 to 25 mph. Higher wind gusts possible.","A mostly clear sky. Low 22F. Winds NW at 10 to 20 mph.","Generally sunny despite a few afternoon clouds. High around 45F. Winds WNW at 5 to 10 mph.","Showers early, becoming a steady rain late. Low 32F. Winds S at 10 to 15 mph. Chance of rain 80%.","Rain showers early with some sunshine later in the day. High near 50F. Winds SW at 10 to 15 mph. Chance of rain 60%.","A mostly clear sky. Low 23F. Winds WNW at 5 to 10 mph.","Generally sunny despite a few afternoon clouds. High 41F. Winds WNW at 10 to 15 mph.","A few clouds. Low around 25F. Winds light and variable.","Variable clouds with snow showers that will mix with rain showers later. High near 35F. Winds NW at 5 to 10 mph. Chance of precip 40%. Snow accumulating 1 to 3 inches.","Clear to partly cloudy. Low 18F. Winds NW at 10 to 15 mph."],"precipChance":[null,50,3,4,4,79,58,6,4,24,38,12],"precipType":[null,"snow","precip","snow","rain","rain","rain","snow","rain","precip","precip","snow"],"qpf":[null,0.02,0.0,0.0,0.0,0.16,0.06,0.0,0.0,0.0,0.14,0.0],"qpfSnow":[null,0.2,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.2,0.0],"qualifierCode":[null,"Q1016","Q1016",null,null,null,null,null,null,null,null,null],"qualifierPhrase":[null,"Higher wind gusts possible.","Higher wind gusts possible.",null,null,null,null,null,null,null,null,null],"relativeHumidity":[null,71,61,68,55,75,78,71,56,74,67,62],"snowRange":[null,"","","","","","","","","","1-3",""],"temperature":[null,27,38,22,45,32,50,24,41,25,35,18],"temperatureHeatIndex":[null,32,37,32,44,37,49,37,40,31,34,30],"temperatureWindChill":[null,16,16,13,14,28,28,17,17,21,23,8],"thunderCategory":[null,"No thunder","No thunder","No thunder","No thunder","No thunder","No thunder","No thunder","No thunder","No thunder","No thunder","No thunder"],"thunderIndex":[null,0,0,0,0,0,0,0,0,0,0,0],"uvDescription":[null,"Low","Moderate","Low","Moderate","Low","Low","Low","Moderate","Low","Low","Low"],"uvIndex":[null,0,3,0,3,0,2,0,3,0,2,0],"windDirection":[null,318,314,309,290,171,229,286,286,106,321,309],"windDirectionCardinal":[null,"NW","NW","NW","WNW","S","SW","WNW","WNW","ESE","NW","NW"],"windPhrase":[null,"Winds NW at 15 to 25 mph.","Winds NW at 15 to 25 mph.","Winds NW at 10 to 20 mph.","Winds WNW at 5 to 10 mph.","Winds S at 10 to 15 mph.","Winds SW at 10 to 15 mph.","Winds WNW at 5 to 10 mph.","Winds WNW at 10 to 15 mph.","Winds light and variable.","Winds NW at 5 to 10 mph.","Winds NW at 10 to 15 mph."],"windSpeed":[null,19,20,17,8,12,13,8,11,4,8,10],"wxPhraseLong":[null,"Snow Showers Early","Partly Cloudy","Clear","Mostly Sunny","Rain","AM Showers","Mostly Clear","Mostly Sunny","Partly Cloudy","Rain/Snow Showers","Partly Cloudy"],"wxPhraseShort":[null,"Snow Showers","P Cloudy","Clear","M Sunny","Rain","AM Showers","M Clear","M Sunny","P Cloudy","R/S Showers","P Cloudy"]}]}
I created a sensors.yaml file with the following entries:
- platform: wundergroundpws
api_key: !secret wu_key
pws_id: !secret wu_pws
latitude: 32.296755
longitude: -106.602996
monitored_conditions:
- humidity
- temp
- precipRate
- precipTotal
- pressure
- windGust
- windSpeed
- weather_1d
- weather_1n
- weather_2d
- weather_2n
- weather_3d
- weather_3n
- weather_4d
- weather_4n
- weather_5d
- weather_5n
- precip_chance_1d
- today_summary
If the custom component is correctly installed under /config/custom_components, the sensors should appear in the Current entities list under Developer Tools. You can add these sensor entities to the Lovelace UI with an entities card.
This worked perfectly! Thanks!
where do you put what you listed?