Skip to content

Instantly share code, notes, and snippets.

@shmick
Created April 29, 2025 04:20
Show Gist options
  • Select an option

  • Save shmick/3562c494cb61ce488f875b627ebb3af8 to your computer and use it in GitHub Desktop.

Select an option

Save shmick/3562c494cb61ce488f875b627ebb3af8 to your computer and use it in GitHub Desktop.

Revisions

  1. shmick created this gist Apr 29, 2025.
    7 changes: 7 additions & 0 deletions dewpoint sensor
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    {% 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) }}