When I bought my boat it came with a tank full warning light, which lit when the tank was supposedly approaching full.
I was worried what would happen if the lamp failed, so fitted an MCS waste tank gauge. These work by sensing air pressure as the tank fills and are pretty accurate provided the tank shape is regular.
https://www.mcsboatproducts.co.uk/
I fitted the MCS gauge and found that the red light on the original tank sensor came on when the tank was 50% full!
The MCS gauge quickly paid for itself by doubling the time between pumpouts