Template switch not working even though scripts do

Can anyone tell me why this does not work? The scripts both work and the boolean tests out OK in the template editor. It was working when I set it up but for the life of me, I can’t see what could be wrong.

  - platform: template
    switches:
      lounge_heat_pump:
        value_template: "{{ is_state('input_boolean.lounge_heat_pump', 'on') }}"
        turn_on:
          - service: input_boolean.turn_on
            entity_id: input_boolean.lounge_heat_pump
          - service: script.turn_on
            entity_id: script.lounge_aircon_on
        turn_off:
          - service: input_boolean.turn_off
            entity_id: input_boolean.lounge_heat_pump
          - service: script.turn_on
            entity_id: script.lounge_aircon_off

try :

  - platform: template
    switches:
      lounge_heat_pump:
        value_template: "{{ is_state('input_boolean.lounge_heat_pump', 'on') }}"
        turn_on:
          - service: input_boolean.turn_on
            entity_id: input_boolean.lounge_heat_pump
          - service: script.lounge_aircon_on
        turn_off:
          - service: input_boolean.turn_off
            entity_id: input_boolean.lounge_heat_pump
          - service: script.lounge_aircon_off

I’m a dumb arse! I was using the input_boolean instead of the newly created switch! Not enough water in my whiskey!