Generic thermostat does not show actual temperature

I have trouble explaining what’s wrong with the configuration I created. Could someone point out where the issue might be?
I have created 4 generic thermostats using sensor entities I created (copy pasted), and which are working fine, see extract from UI showing these sensors.

I have then created 4 generic thermostats (copy pasted) and only one is working properly. The other ones are showing as below no actual temperature reading.

Here is the script I use.

climate:

  • platform: generic_thermostat
    name: Th2_dessus_garage
    heater: switch.neviweb130_switch_th2_dessus_garage
    target_sensor: switch.neviweb130_switch_th2_dessus_garage_temperature
    min_temp: 10
    max_temp: 25
    target_temp: 20
    cold_tolerance: 0.3
    hot_tolerance: 0
    precision: 0.1
    unique_id: Th2_dessus_garage

  • platform: generic_thermostat
    name: Th1_principal
    heater: switch.neviweb130_switch_th1_principal
    target_sensor: sensor.switch_neviweb130_switch_th1_principal_temperature
    min_temp: 10
    max_temp: 25
    target_temp: 20
    cold_tolerance: 0.3
    hot_tolerance: 0
    precision: 0.1
    unique_id: Th1_principal

  • platform: generic_thermostat
    name: Th3_sous_sol_arriere
    heater: switch.neviweb130_switch_th3_sous_sol_arr
    target_sensor: switch.neviweb130_switch_th3_sous_sol_arr_temperature
    min_temp: 10
    max_temp: 25
    target_temp: 15
    cold_tolerance: 0.3
    hot_tolerance: 0
    precision: 0.1
    unique_id: Th3_sous_sol_arriere

  • platform: generic_thermostat
    name: Th4_sous_sol_avant
    heater: switch.neviweb130_switch_th4_sous_sol_av
    target_sensor: switch.neviweb130_switch_th4_sous_sol_av_temperature
    min_temp: 10
    max_temp: 25
    target_temp: 15
    cold_tolerance: 0.3
    hot_tolerance: 0
    precision: 0.1
    unique_id: Th4_sous_sol_avant

I just can’t understand why this works for one and the other 3 are not. Everything is the same.

Switches are not sensors.

Agreed.

The switch in question is a multi-control device which has a temperature sensor built in which is an attribute of the multi-control device. I have created a sensor entity out of this temperature attribute.
I have 4 physical instances of that same multi-control device and the sensor entity created based on the temperature attribute is working fine for all 4 of them (somehow I can’t add an image to this post to show this).
The first generic thermostat works perfectly.
Somehow, with the same code lines, the other 3 are not fine (not actual temperature reading).

The code is not the same. Th1_principal is working because…

target_sensor: sensor.switch_neviweb130_switch_th1_principal_temperature

… it’s using a sensor as a sensor.

Thanks for your help. You spotted the flaw in my code. I will get better at this.

1 Like