Two channel logical switch
Look into the function of an SR latch.

In an S-R latch, activation of the S input sets the circuit, while activation of the R input resets the circuit.

In your case the &lt;30% signal can be connected to the set and &gt;80% signal can be connected to the reset inputs. Fortunately, both the above won't be high at the same time.
SR latch can be made using gates (and feedback connections)