I am fortunate enough to have Home Assistant Yellow running in my home. I am also fortunate enough to have a favorite human that is brilliant at creating micro-controller gadgets. He created his own temperature and humidity sensors that connect to MQTT to send the temp and humidity to your MQTT broker, in this case I'm using Mosquitto of course as a Home Assistant Add-on. I installed a Kasa smart switch in the bathroom, this switch can be controlled either manually or through Home Assistant. Then I put one of  the temp/humidity sensors that he created in there. The temperature sensor is battery operated and wifi enabled, it only wakes up to send a MQTT message if the temp changes by 2 degrees or the humidity changes by 5% then goes back to sleep. 

So I started with yaml to add the sensors as an entity. Then I went to Node red (also a Home Assistant add-on) and added the sensors with the mqtt nodes, one for the temp and one for the humidity. Then I used the Function node to set up the conditions for the switch to turn on. If the humidity msg.payload is >= 60 turn the switch on, else turn it off. I added the 'current state' nodes as well to check if it is already on, or already off, that way it's not activating the trigger if it doesn't need to. It works great, it saves my bathroom, saves energy, and saves my sanity.