Aquarium controller with a debounce on the temperature sensor

I am having trouble thinking of how to do they hysteresis, am I on the right track?

I am changing the state of the heater and digitalWriting that state until the else if tells it to change to the opposite state after hitting the mark of setpoint + a specified number

hysteresis = setPoint + .50;

sensors.requestTemperatures();

if (sensors.getTempFByIndex(0) < setPoint) {
heaterState = HIGH;
} else if (sensors.getTempFByIndex(0) >= hysteresis) {
heaterState != heaterState;
}

digitalWrite(heater, heaterState);