I was just thinking, perhaps using a Shelly could work as well.
Thermostat > Shelly input > Shelly output > heating system
That way the Shelly can accept or ignore the input from the thermostat and HA can override the thermostat if desired by setting the Shelly in another mode. Wonder if that would work…
Alternatively (you’d get no feedback from the stat) but you could just wire them in series, so the shelly switches off at night and if unoccupied otherwise the stat controls the boiler.
I have a couple of danfoss z-wave stats, just used for temperature detection, dedicated boiler switch and all the logic in HA