Aquarium controller with a debounce on the temperature sensor

You do not "debounce" a temperature sensor. As aarg wrote, use hysteresis. For example, if the setpoint is 15 (degrees C), turn the heater on at 14 (or below) and turn the heater off at 16 (or above). The "deadzone" in this example is 2 degrees C. This example assumes of course that the environment is working to cool the water when the water is within a few degrees of the setpoint else a cooler and more complex logic is needed.