@ato_arduino here I see it as two processes, with only the thin link that the second process is informed by the state of the first process:
On the left is the simple two state hysteresis control of the fluid level by the ATO.
On the right is a timer/controller for the Flish. It is idle until the ATO kicked it into action, where it repeats the on/off cycle until the ATO signal goes LOW.
I say again that a bit of logic to perform, or not perform, @gcjr's switch/case is all you need add.
a7
