Curl command to reboot OpenWRT router in HA

Hoping someone can help with this. I’ve been trying to create a one line command using curl to reboot my OpenWRT router from within HA. So far everything I tried doesn’t work. Has anyone manage to get this to work?

  - switch:        
      name: reboot_openwrt
      command_on: "ssh -i /config/ssh_keys/mykey -o 'StrictHostKeyChecking=no' [email protected] 'reboot'"

I know it’s not curl but you could do something like this with ssh keys on openwrt

Thanks… Where do I put this to test

It goes in configuraion.yaml file under command_line: