Obtain the thermostat set point value minus the room temperature

I should obtain the thermostat set point value minus the room temperature, to perform automations. How can I do?

can anyone help me?