Rachio Switch Template

I am trying to setup up and automation where the Rachio Controller will shutoff a valve when a value is reached on a soil moisture sensor.

only thing is because the switch is only an entity and I cant trigger it in automations (can only devices be triggered?) so I think I need to create a switch template but I am not really sure how to do that correctly. I tried the following code but returns this:
29 |
30 | switch:
31 | - platform: template
32 | switches:
------------------^
33 | copy:
34 | value_template: "{{ is_state('switc …

Code I tried:

     switch:
  • platform: template
    switches:
    copy:
    value_template: “{{ is_state(‘switch.zone_15’, ‘on’) }}”
    turn_on:
    service: switch.turn_on
    target:
    entity_id: switch.zone_15
    turn_off:
    service: switch.turn_off
    target:
    entity_id: switch.zone_15

(the code isn’t staying formatted so I included a screenshot.)
I tested it in the template editor and it seemed ok…but I still get the error.
Also IDK if its just and issue with Rachio or my configuration but I am not getting the state of the switches. If I Switch something on in the app it wont show so ON in state or the log. I do run a Pi-Hole so IDK if that could be blocking the webhooks

IDK if the template code I used the I copied from the template guide will work if it cant get the state.

You absolutely can use an entity as an action in automations, it’s one of the options in the automation editor.

service: switch.turn_off
data: {}
target:
  entity_id: switch.back_yard_east

Interesting, that’s great but weird it’s limited in the GUI settings.

I guess I don’t understand, what’s limited about it?