Thermostat controlled by temp sensor

I have this configuration here: a danfoss thermostat which controls a heating device and a ds18b20 connected to a fgk101, both installed in the same room.
I need a rule that will keep all the time let’s say 24 degrees in the room but this has to be done like that: when the temp sensor detect less than 24 degrees in the room to set the thermostat to maximum degree that being 28 in order to activate the valve and when temp sensor detects more than 24 degrees to send command to the thermostat to set 24 degrees in order to close the valve.
Any suggestion will be kindly appreciated.

You just wrote the rule there.
Have a go at the code and we’ll help