Control Thermostat with two sensors

I have an electric heating system in my floor for one room. I would like to use the temperature sensor in my light switch to measure the room temperature and control the heater. The Generic Thermostat seems to be perfect for this.

Unfortunately, I have an additional constraint: The floor can’t get hotter than 30°C, otherwise there might be damage. The heating system came with a floor temperature sensor, which I installed and also connected to Home Assistant.

Is there an option to control the thermostat with two sensors? One for the (adjustable) room temperature, and additionally the floor sensor, which turns of the heating once the floor reaches 30 °C?

Can I just use the thermostat, and an additional automation which turns it off if necessary?

Yes, but if it is possible to damage your floor this second sensor should really be wired into some sort of hardware fail safe, in case home assistant is not online.

Hi, Tom.

Could you please give a hint, how to use for thermostat more complecated logic, than just one sensor.

I need two sensors two.