What do you use for valve automation? Is it a commercial or custom part? I've been wanting to do the same myself, but I hear there's all sorts of quality issues with automatic valves.
I originally bought some solenoid valves to experiment with, but ended up simplifying my approach. I use a submersible pump that is plugged in to power. I can just automate turning on/off power to that outlet (I have two TP-link / Kasa HS300 strips). The nutrients / water are in a tank below the tray of plants, so when the power is "off", gravity brings the water back through the pump into the tank again.
What a clever and simple solution, I love it. I have been thinking about such a grow system for a long time for my chilli plants, and after having had a few split solenoid valves on a different irrigation project I was very hesitant. Thanks for the inspiration.
Not OP but I use motorized ball valves from Amazon [1] which are hooked up to a four way water hose manifold to create four different zones. It's wired up to an ESP32 that controls them with relays via GPIO, using the ESPHome sprinkler controller module (which does pretty much everything OP's code does). I've never had a problem with them and the last time I even touched them was over a year ago. They're pricey but you can DIY them.
The usual sprinkler valves at hardware stores need quite a bit of water pressure to change state which is probably what most people have a problem with, especially if they're trying to feed them with the kind of pumps they get at hydroponic stores.
Not OP, but I made one of these for my partner and I’s bonsai garden.
I use standard 3/4” sprinkler valves from the big box stores, connected to a manifold via unions on each side. This enables me to swap if needed, but these are ruggedized and will last a while. They do take 12VAC, so you need a transformer and use relays to turn them on, but they work very well.