Skip to content

Instantly share code, notes, and snippets.

@shmick
Created April 29, 2025 04:20
Show Gist options
  • Save shmick/3562c494cb61ce488f875b627ebb3af8 to your computer and use it in GitHub Desktop.
Save shmick/3562c494cb61ce488f875b627ebb3af8 to your computer and use it in GitHub Desktop.
dew point home assistant template sensor
{% set temperature = states('sensor.indoor_outdoor_meter_fea7') | float %}
{% set humidity = states('sensor.indoor_outdoor_meter_fea7_humidity') | float %}
{% set a = 17.27 %}
{% set b = 237.7 %}
{% set alpha = ((a * temperature) / (b + temperature)) + (log(humidity / 100.0) if humidity > 0 else 0) %}
{% set dewpoint = (b * alpha) / (a - alpha) %}
{{ dewpoint.real | round(1) }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment