PWS Weather Station Upload

This blueprint allows you to upload weather data from Home Assistant to a Weather Station in PWS Weather. This can be useful if you have solutions that rely on PWS Weather data, such as irrigation systems.

PWS Weather Upload

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Requirements

Features

  • Supports metric and imperial units.
  • Only uploads new data when triggered by entity state change.
  • Dew Point value can be calculated based on selected temperature and humidity sensors.
  • Supports uploading the following sensors to PWS Weather:
    -Temperature
    -Humidity
    -Barometric Pressure
    -Wind Direction/Angle
    -Wind Speed
    -Wind Gust
    -Hourly Rainfall
    -Daily Rainfall
    -Solar Radiation
    -UV Index

Setup

  1. Add the following lines of code to your configuration.yaml
shell_command:
  curl_post: "curl -X POST \"{{ url }}\""
  1. Restart Home Assistant
  2. Import the Blueprint using the link above
  3. Enter the Station ID, API key, sensors to upload and trigger sensors.
  4. Save Automation

More Info

Available on GitHub here

That is a great blueprint. The upload of the measurement data to pwsweather.com dashboard works. However, I have noticed a deviation in the calculation of the dew point temperature (calculate_dewpt=true). Could it be that a log() is missing in the formula, i.e. when calculating alpha ?

  dewptf: >
    {% if calculate_dewpt and tempf != 'none' and humidity != 'none' %}
      {% set T = tempf | float %}
      {% set RH = humidity | float %}
      {# Convert F to C for dew point calculation #}
      {% set T_C = (T - 32) / 1.8 %}
      {% set A = 17.27 %}
      {% set B = 237.7 %}
      {% set alpha = (A * T_C / (B + T_C)) + (RH/100) %}
      {% set dewpt_C = (B * alpha) / (A - alpha) %}
      {% set dewpt_F = (dewpt_C * 1.8) + 32 %}
      {{ dewpt_F }}
    {% else %}
      none
    {% endif %}

i.e. computing alpha by something like this:

      {% set alpha = (A * T_C / (B + T_C)) + log(RH/100) %}
1 Like

Thanks for picking up the calc mistake :slight_smile: I’ve updated the blueprint

1 Like

Has anyone found a complete list of variables we can send? For example I have an Air Quality Monitor and would love to send that as well.

@drkpxl Refer to the PWSweather-API_string_2020.txt file on my repo here

1 Like