You may need to clarify the maths used.
Though I don't get what you have, if you express it as a problem (an old term used when talking to children to create a scenario that needs solving) it shouldn't be hard to resolve.
So, there is an input:
boiler has gone out
I don't get the next part:
Temperature and buffer full are not related.
Anyway, so my take is something like this:
boiler off --> Enable timer loop.
Timer loop --> (every 10 seconds?) --> Read temperature. (Don't know why)
Get temperature --> check if it is a value --> act on it if it is needing.
But you will have to put more details in that.