My first post hurray!
I am trying to replace a simple 2-way switch that control my fan at the switch box with a humidity sensor and fan control unit.
The current wiring is throwing me off (and I have to say I am not an expert by any stretch).
The light fixture contains the black (feed) from the breaker and that's pigtailed with the two blacks that go to the switch box. One is for the fan and one is for the light(s).
The whites are all pigtailed at the light fixture box and then go from it to the switch box separately (one per Romex). They end up at their respective switch.
The fan one contains a red that seems unused. I could not understand how the fan is hooked up but I assume this somehow happens in between the two boxes.
Now, the humidity sensor has hot (line) and white, which I do have, but then requires a load for the fan.
I was thinking of using the white+hot used for the light switch for the line (and white) and black for the load.
However, it does not smell like the correct solution.

The house is ~40 years old.
– Andrea Richiardi Oct 14 '21 at 22:51