Shopping around for a fan/ventilation management solution in HA

before I really understood what things like blueprints were for I wrote my own script to manage the ventilation in my hot houses.

essentialy if the temperature sesnsors gets to a certain temperature for a certain period if time it switches on some smart spurs connected to extractor fans to suck out the hot air, and if it’s not raining it opens some vents, until the temperature gets below a certain threshold for a certain period then it turns everything off again, with different behavior for day and night cycles.

It does exactly what I need, but it’s not very flexible and I’ve changed so many bits over the last few years that the code is a mess and its difficult to extend.

I’ve got two choices, rewrite the whole thing from scratch to be properly compliant, or find something that someone else has made which does what my script does, but better.

I’ve tried a couple of things like advanced Ventilation management is but they weren’t really what I needed.

can anyone recommend a ventilation control system with scheduling, and preferably a lovelace interface that can handle multiple devices on a single script?

I’m using Sonoff zigbee temperature sensors and my extractor are switched by shelly smart relays.