Calling rest_command service from appdaemon

Hi Guys-

I have a rest_command defined in home assistant that looks like this:

rest_command:
  espresso_on:
    url: 'http://tinyurl.com/xxxxx/on'

I can call it from HA dev tools with a simple:

rest_command.espresso_on

Out of appdaemon I’m trying the following, but it doesn’t appear to be working. This also doesn’t look quite right given other call_service commands I have.

self.call_service("rest_command.espresso_on")

any tips. Thx.

Try

self.call_service("rest_command/espresso_on")
1 Like

yeah that looks like the issue:

  File "/usr/local/lib/python3.6/site-packages/appdaemon/plugins/hass/hassapi.py", line 490, in _check_service
    raise ValueError("Invalid Service Name: {}".format(service))
ValueError: Invalid Service Name: rest_command.espresso_on