Modern Switch Template Migration Blues

Hope this is in the proper forum location, but I’m having a terrible time migrating my switches.yaml content to the new ‘modern’ syntax. I’m turning up tons of info online, but as always, none seem to address my configs. My contents look like this:

switch:
- platform: template
    switches:

     spa:
       value_template: "{{ states('sensor.pool_circuit1') | int(0) == 1  }}"
     turn_on:
         service: script.spa_on
     turn_off:
         service: script.spa_off

I had many switches defined, all of which are now throwing ‘fix me’ errors, but I can’t for the life of me get any of these to work. I’m hoping once I get these corrected I can tackle all my sensors, which are barking at me for the same reasons.

If I can resolve a single switch, I think all my other issues will fall in line.

Thanks in advance for any assistance any of you can provide.