Temperature control with hysteresis

Hello, I have a project with arduino (a temperature control), which has the following parameters:
int temperature = sensor value
int set = set point
int hyst = hysteresis range
int H= output in port 3
I have these conditions currently:

if (temperature> set) {
digitalWrite (H, HIGH);
}
else {
digitalWrite (H, LOW);
}

The problem is when the temperature reaches the set point, the actuator (H) turns off, but when it goes down 1 ° C, it turns on again, what I want is that for example if I have a temperature = 20 and I ask for 30, the actuator goes off at 30 and once turned off it is activated again at 25, if the hysteresis = 5, not like now that it would activate at 29.
I hope you can help me greetings.

(deleted)

Alex_MG:
The problem is when the temperature reaches the set point, the actuator (H) turns off, but when it goes down 1 ° C, it turns on again, what I want is that for example if I have a temperature = 20 and I ask for 30, the actuator goes off at 30 and once turned off it is activated again at 25, if the hysteresis = 5, not like now that it would activate at 29.
I hope you can help me greetings.

It makes more sense to me to apply the hysteresis symmetrically around the set point.

You may also find something which you can use in this topic related to hysteresis : Hysteresis - Introductory Tutorials - Arduino Forum