Good point. I was only have issues with the function node. Here’s the whole flow:
[{"id":"adf9dab36c06d7fb","type":"tab","label":"Master Bath Vent Fan - V2","disabled":false,"info":"","env":[]},{"id":"32c50907.2cde1e","type":"stoptimer","z":"adf9dab36c06d7fb","duration":"5","units":"Minute","payloadtype":"num","payloadval":"0","name":"Wait 5 Minutes","x":1340,"y":220,"wires":[["cdfbf50a.3eecc8"],[]]},{"id":"cdfbf50a.3eecc8","type":"api-current-state","z":"adf9dab36c06d7fb","name":"High Humidity?","server":"1952aa83.c9e0e5","version":2,"outputs":2,"halt_if":"sensor.home_humidity","halt_if_type":"entity","halt_if_compare":"gt","entity_id":"sensor.lumi_lumi_weather_336f0807_humidity","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"true","valueType":"bool"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":1000,"y":340,"wires":[["7e082343.a7f13c"],["c5c47556.bb3f8"]]},{"id":"c5c47556.bb3f8","type":"api-call-service","z":"adf9dab36c06d7fb","name":"Turn off fan","server":"1952aa83.c9e0e5","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.main_vent_fan_9cf395fe_on_off","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1330,"y":340,"wires":[[]]},{"id":"7e082343.a7f13c","type":"stoptimer","z":"adf9dab36c06d7fb","duration":"1","units":"Minute","payloadtype":"num","payloadval":"0","name":"Wait 1 min","x":1330,"y":280,"wires":[["cdfbf50a.3eecc8"],[]]},{"id":"595cf5bf.3e5e34","type":"api-call-service","z":"adf9dab36c06d7fb","name":"Turn on fan","server":"1952aa83.c9e0e5","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.bathroom_vent_fan_on_off","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1030,"y":220,"wires":[["32c50907.2cde1e"]]},{"id":"29de0b58a85d3aa0","type":"inject","z":"adf9dab36c06d7fb","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"44","payloadType":"num","x":760,"y":120,"wires":[["595cf5bf.3e5e34"]]},{"id":"e71797bfe2050169","type":"function","z":"adf9dab36c06d7fb","name":"","func":"if (\"sensor.lumi_lumi_weather_336f0807_humdity\" > (5 + \"sensor.home_humidity\"))\n {msg.payload = true;\n}else{\n msg.payload=false;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":640,"y":260,"wires":[["eb51ee5cd5fa77ad","595cf5bf.3e5e34"]]},{"id":"28f50d4e5d6daeb7","type":"poll-state","z":"adf9dab36c06d7fb","name":"","server":"1952aa83.c9e0e5","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":true,"entity_id":"sensor.lumi_lumi_weather_336f0807_humidity","state_type":"num","halt_if":"0","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"x":210,"y":180,"wires":[["e71797bfe2050169"],[]]},{"id":"82340667d3e18d56","type":"poll-state","z":"adf9dab36c06d7fb","name":"","server":"1952aa83.c9e0e5","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":true,"entity_id":"sensor.home_humidity","state_type":"num","halt_if":"0","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"x":190,"y":240,"wires":[["e71797bfe2050169"],[]]},{"id":"eb51ee5cd5fa77ad","type":"debug","z":"adf9dab36c06d7fb","name":"vent function output","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1000,"y":480,"wires":[]},{"id":"1952aa83.c9e0e5","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open|1","connectionDelay":true,"cacheJson":true}]