Skip to content

Instantly share code, notes, and snippets.

@mjrit
Last active June 18, 2024 23:17
Show Gist options
  • Save mjrit/16c9cc58140f42cdde4b19d1e83b30b5 to your computer and use it in GitHub Desktop.
Save mjrit/16c9cc58140f42cdde4b19d1e83b30b5 to your computer and use it in GitHub Desktop.
Home Assistant template for calculating BoM (Australia) "feels like" temperature

I use this in a Home Assistant Template helper so it's updated automatically when any of the source sensors update. This is based on the simplified formula documented by the BoM here: http://www.bom.gov.au/info/thermal_stress

Substitute your sensor names

  • YOUR_TEMP_SENSOR - degrees C
  • YOUR_HUMDITY_SENSOR - percentage
  • YOUR_WIND_SPEED_SENSOR - km/h
{% set temp = states('sensor.YOUR_TEMP_SENSOR') | float %}
{% set humidity = states('sensor.YOUR_HUMIDITY_SENSOR') | float %}
{% set wind_speed = states('sensor.YOUR_WIND_SPEED_SENSOR') | float %}
{% set wvp = humidity / 100 * 6.105 * e**(17.27 * temp / (237.7 + temp)) %}
{{(temp + 0.33 * wvp - 0.70 * wind_speed * 0.277777777777778 - 4.00) | round(1)}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment