Automating heating cutoff using two entities?

If you are up for a challenge Mike, try this one, it’s complex - I may not be explaining very well so all advice and help greatly appreciated. Is it even possible.

Howto shutoff heat pump when LWT<30 using Onecta integration - Configuration - Home Assistant Community