For the below temperature and humidity ranges Arden Buck seems to match Lawrence to 1 decimal place. turns out after checking, my macro is using the Arden Buck equation. Dropping the P as the thread on the Home Assistant Community Forum mentions.
Feels Like (Top Right)
Dew Point (Top Left)
MACRO custom_templates/macros.jinja
{% macro calculate_dew_point(entity_temperature, entity_humidity) %}
{% set T, RH = states(entity_temperature), states(entity_humidity) %}
{% if (T == 'unknown') or (RH == 'unknown') %}
unknown
{% elif (T == 'unavailable') or (RH == 'unavailable') %}
unavailable
{% else %}
{% set T = T | float %}
{% set RH = RH | float %}
{% set a = 6.1121 | float %}
{% set b = 18.678 | float %}
{% set c = 257.14 | float %}
{% set d = 234.5 | float %}
{% set e = 2.71828 | float %}
{% set gamma = log((RH/100)*e**((b-T/d)*(T/(c+T)))) | float %}
{% set dew_point = ((c * gamma) / (b - gamma)) | round(1) %}
{{ dew_point }}
{% endif %}
{% endmacro %}
TEMPLATE SENSOR - configuration.yaml/
- sensor:
- name: "dewpoint_outside"
unique_id: 2fac14a6-affd-4985-88d6-67b3cff34e3f
unit_of_measurement: "°C"
icon: mdi:thermometer-water
state: >
{% from 'macros.jinja' import calculate_dew_point %}
{{ calculate_dew_point('sensor.netatmo_outdoor_temperature', 'sensor.netatmo_outdoor_humidity') }}
