[solved with a shell_command] Rebooting remote system with webcal and RESTful switch?

I have done a search here in the forum, read a lot of topics, but I don’t know the right terminology and what woud be the best way to make this work.

I’m trying to add a switch to reboot a remote system.
This can be done with “cgi-bin/main.cgi?ACTION=reboot” in a browser but if I configure this switch:

- platform: rest
  name: Reboot Remote System

that system seems to go into a bootloop without doing anything.

I would like to have some kind of lovelace button to activate this command.
Is there another/better way to achieve this?

Thanks for any help!

It seems like restful switch cannot use GET requests to set the state.

I’d use a shell command:

  reboot_server: "curl ''"
1 Like