Humidity controlled fresh air

Hello,

I’m new to Hassio (Home Assistant OS 5.10, Raspberry Pi 3) I have a program in mind but I would like your help to adapt it properly to Hassio.

So I have temperature and humidity sensors inside and outside the house (the entities are created and are working):

  • sensor.interior_temperature
  • sensor.interior_humidity
  • sensor.exterior_temperature
  • sensor.exterior_humidity

And a relay to trigger the fresh air ventilation (air exchange with outside).

  • switch.fresh_air

Now, what I want is to have a humidity target that I can set in the dashboard (Example: target 40% humidity), and do calculations using the temp and humid sensors to figure out if If the exterior air will dehumidify efficiently and if so trigger the relay.

I won’t bore you with the maths just jet, but could you help me figure where to write the code and variables, I’m not sure if that goes in automation, scripts, or an entity. Thanks your your hint, once I know what to concentrate on I will read that part of the manual.

1 Like

Search dew point to get started. I can’t post examples right now since I don’t have power or internet at home, therefore, can not access my HA now.
Also the purpleair discussion here has the automation for your fans, you just need to modify a bit.
So are you going off of absolute humidity or doing it more simply by dew point?

Not quite, I’m going for the enthalpy differential, I could start with something more simple (to avoid pulling in humid air if it’s wet outside) but the platform is powerful enough to do the math and I have all the sensors I need. I will take a look at your suggestions to start somewhere, since the best way to learn a new coding language is to look at existing code. Thanks, if you have other examples don’t hesitate.

Can you share your code for calculating enthalpy?