Generic Thermostat and Unavailable Sensor

The other night my temperature sense was knocked out of the plug and I woke up to the room being about 30 degrees (and a newborn screaming).

It seems the climate control just continued heating the room waiting for a temperature reading to increase but as the sensor was unavailable it never came.

How would I go about preventing this? An automation on sensor becoming available to turn off the climate? i think that might be a bit prone to misfiring if wifi goes down etc… Perhaps a value template that returns a high temperature if the sensor is unavailable?

Did Home assistant see it as unavailable

I would do a automation

and one of the action could be to send you a message