Custom Component for Tasker/AutoRemote

I followed this tutorial, with no success. Apparently, you can’t use import in python scripts, that’s also the error I got.

So I tried creating a custom_component called hello_state.py :

DOMAIN = 'hello_state'

import requests
requests.get('https://autoremotejoaomgcd.appspot.com/sendmessage?key=xxxmessage=SayOn')

return True

and I added this to my config yaml:

hello_state:

But it’s not showing up in my Services. What am I missing?

@ESEL3000 I’m curious, have you made any progress on your custom component?

1 Like

Yes I did, by using this:

rest_command:
  example_request:
    url: 'https://autoremotejoaomgcd.appspot.com/sendmessage?key=xxxmessage=SayOn'
1 Like

How do you call this from an automation? I’ve been trying to get that tutorial to work as well, with no look. I also came across the rest_command. However, I’m having trouble getting it to work.

It works fine if I just call the rest_command using the service developer tool, but when I try to add it to an automation, I can’t get it to work because the automation requires data. So I tried adding some garbage data, and when testing it using the service developer tool, it still worked with the garbage data. But when I add the garbage data to my automation, it still doesn’t work… Can you provide a sample automation using rest_command?

@HeffeD

In response to your question from a year ago! Automation REST command as follows…

  action:
    - service: rest_command.name

You do not have add any data, simply call the REST service with the name of the REST command - as you would in the Developers Tools.