Skip to content

Instantly share code, notes, and snippets.

@epaulsen
Created October 7, 2023 08:16
Show Gist options
  • Save epaulsen/36ad5c2dc1a48cad0868dae09890802b to your computer and use it in GitHub Desktop.
Save epaulsen/36ad5c2dc1a48cad0868dae09890802b to your computer and use it in GitHub Desktop.
Duggpunkt sensor
- name: "Duggpunkt bad oppe"
icon: "mdi:thermometer"
unit_of_measurement: "°C"
state: >
{%set fuktighet = states('sensor.temperatur_bad_oppe_humidity') | float(0) %}
{%set temp = states('sensor.temperatur_bad_oppe_temperature') | float(0) %}
{%set x = (log(fuktighet/100) + (17.625 * temp)) / (243.04 + temp)%}
{{ ((243.04 * x) / (17.625 - x)) | round(2)}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment