Upload weather data from Home Assistant to a PWS Weather station
- Add the following lines to your Home Assistant
configuration.yaml. This defines arest_commandnamedpws_uploadthat the blueprint uses to send data to PWSWeather without spawning an external process. Your Station ID and API key will be passed as part of the request URL:
rest_command:
pws_upload:
url: "{{ url }}"
method: POST
-
Restart Home Assistant.
-
Create an account and then a Station in PWS Weather.
-
Import the Blueprint:
- Enter your Station ID and API Key, then any weather values to share.
- Ensure you select an entity to trigger data uploads (e.g. a temperature sensor).
- Optionally set a Minimum Upload Interval if you want to throttle how often data is sent to PWSWeather.
- Choose any extra sensors you wish to include such as Monthly or Yearly Rainfall and set a Weather Condition string if desired.
- Override the Software Type if you want a custom value.
- Save Automation.
When logging is enabled, the blueprint records the HTTP status code returned by the PWSWeather API so you can confirm successful uploads.
The file PWSweather-API_string_2020.txt lists all parameters supported by the
PWSWeather API. Use it as a reference when deciding which sensors to include.
PWS_Upload_sample.py can be run from the command line to test API requests
without Home Assistant. Replace the placeholder Station ID and API key in the
script before running.
- David Defreest House for sharing PWS Weather API spec in the WeatherLink-to-PWSweather script
- Dirk van Donkelaar for providing baseline blueprint structure as part of the WUnderground data uploader blueprint