Aquarium controller with a debounce on the temperature sensor

That is the correct idea but it is hard to help when I do not know how hysteresis was declared, how setPoint was declared, how heaterState was declared, or what getTempFByIndex(0) returns.

Assuming that hysteresis and setPoint were declared float or double, and assuming that heaterState is declared int, and assuming that getTempFByIndex(0) returns a float or a double, then I might be tempted to write:

hysteresis = setPoint + .50;

sensors.requestTemperatures();
float temperatureF = sensors.getTempFByIndex(0) 

  if (temperatureF < setPoint) {
    heaterState = HIGH;
  } else if (temperatureF >= hysteresis) {
    heaterState = LOW;
  }

  digitalWrite(heater, heaterState);

but that just makes the heaterState more obvious and avoids getTempFByIndex(0) doing whatever it does twice. Your code snippet probnably works (depending upon whatever the rest of the code that I can't see is).

By the way, hysteresis is usually the difference (or one half the difference) between the upper setpoint and the lower setpoint, so the variable is misnamed. The 0.50 value that you use is the true hysteresis.

If you declared your variable hysteresis as an int or a long, you are going to have a problem.

Before you post any more code snippets, please see this.