Switch on Fan Based on Humidity readings controlled by Homeassistant

I have a Humidity problem under my House and would like to read the Humidity under my House and Outside my House. Based on the two values I like to switch on a FAN. All that should be controlled by Homeassistant running on a Rasberry Pie. I am new to all this so please be detailed if you please be so kind.

  1. What Sensors would be good for this kind of Application
  2. What switch would work
  3. How do I setup the If (HumiditySensor1-HumiditySensor2) > configuredValue Than SwitchOn(Fan)
    logic
  1. There are lots of different humidity sensors from different manufacturers with different protocols and there’s also DIY
  2. Depends on the fan
  3. Automations
  1. any recommendation for just buying one which integrates over WIFI?
  2. just a normal 110 Outlet style of a Fan
  1. Don’t know any out-of-the-box solution with WiFi, but you can easily build one yourself with an ESP8266 and a DHT22.
  2. A Shelly or a SonOff switch should be fine.