Template Switch not running actions with value_template

switch:
  - platform: template
    switches:
      tado_radiators:
        friendly_name: "Tado Radiators"
        value_template: "{{ states('input_number.tado_activation_threshold_temp')|float > 15 }}"
        turn_on:
          service: script.tado_radiators_auto
        turn_off:
          service: script.tado_radiators_off

Any idea why the the turn_on and turn_off actions are not called in the above configuration? The scripts run fine on their own, but I they are not getting triggered.

Curiously if I remove the value_template line (and turn the switch manually) they do get called.

Thanks.

The value_template in a template switch does not operate the switch, it just provides a “channel” to communicate the state of the switch.

I think you probably want an automation (or a generic thermostat) to do the switching.

Thanks Troon, that’s a shame I was looking to bind the sensor and the switch together so that they live permanently together as one object. I already had it set up as 2 automations (1 for on, and another for off) but I was looking to improve. I thought a switch/sensor bind was possible - I think it would be more elegant than 2 separate automations (I have an increasing number of automations building up and in some cases they are fighting against each other). Thanks again.