In Automation, call an external API url

Hello,

I want, when an automation is triggered by a motion sensor, call an external API url.
I’ve tried this :

switch:
 - platform: rest
   name: "screenon"
   resource: "http://192.168.0.98:9000/hooks/screen-on"

But I can’t add the action in automation: there is no “screenon” device available. Some help would be appreciated :slight_smile:

Thanks !

It means the Switch integration is not successfully created if you cannot find it in Developer Tools → States (tab). Review the documentation once more to add more info in the config-

Do you have another switch: header in your configuration.yaml? If yes, you should merge them under one switch: header.

1 Like

There was another error (non related) in configuration.yaml : Hass was not reloading properly.