Rpi RF switch problems in config automation, but none in front end

Hi all, i seem to be having what is probably a syntax error of some type.
Toggling RF outlets working is from the front end but not when called in config.
Here’s my setup:

switch:
platform: rpi_rf
gpio: 17
switches:
fish_pump:
protocol: 1
pulselength: 184
code_on: 333107
code_off: 333116

automation 3:
trigger:
platform: time
minutes: ‘/2’
seconds: 0
action:
service: switch.toggle
entity_id: switch.fish_pump

Thanks!

Edit: I am using elekcity ZAP outlets i purchased today.

Please indent your code using