Something is wrong with my generic thermostat. If as target_sensor I put an Aquara temperature sensor, generic thermostat works. With the Sonoff TH16 generic thermostat was always INACTIVE.
Ultimately, it’s your choice of which reply to your problem should be assigned the Solution tag but the common convention is to assign it to the first or most complete post that identifies and resolves the original problem.
In the interests of fairness, I think you should mark VDRainer’s post with the Solution tag because it is the first post to identify the problem to be due to an incorrect entity_id. I simply added context.