Dew point custom and simple sensor

Recently I wanted to update the way I control my bathroom ventilation in Home Assistant, instead of relying solely on the direct value for Relative Humidity, since the humidity of my entire house varies quite a lot with the outside humidity and temperature - I have a Mechanical Heat Recovery Ventilation (MVHR) system in my apartment.

After some online reading, I got to the conclusion that a simple and better way to do this would be to use the room’s dew point, as it closely relates to comfort and safe values of humidity while minding the room’s temperature.

There are already some custom integrations that are able to provide this, but I still wanted to experiment with a simple and native (to HA) to do this. That is why I created some Jinja macros, which I then use in Template Sensors for each of the room I want to track the dew point. You can find the templates in this gist. I included web sources in the template’s comments.

Hope this helps someone :slightly_smiling_face: