I've seen a pic of one that's for sale that is basically a SEALED hard container with a tube coming out... the idea is that the tube is at the top of the water.... when the water level drops, it allows a bubble of air to go up the tube and displace a little water.
Seems risky to me, but if it works for you, let us know.
There are relatively inexpensive float valves such as:
54g all-glass bowfront corner planted FW
Red tiger lilly, Rotala Indica, Sagittaria Subulata, Micro Sword, Cardinal Plant
Fluorite Black sand and gravel