How to wire and code thermistor that can also detect liquid level?

No. If you did that, when the switch closes, it would short ground to 5V and do something bad.

You wire the two red wires of the switch like a button: