I’m stucked with the invocation of an app running in AppDaemon from a HA automation. This app makes use of libraries that I can’t afford to have running in the HA docker.
The invocation from HA is based on a rest_command.
The problem comes with parameters :
action: rest_command.get_screenshot
data:
filename: first_test.pdf
items: blabla
Here is the definition of the app (apps.yaml) :
screenshot_api:
module: screenshot_api
class: ScreenshotAPI
param1: filename
param2: items
Is this the correct approach for the HA side ?
If so, how can I get these params available in my app on AppDaemon side ?
class ScreenshotAPI(hass.Hass):
def initialize(self):
self.register_endpoint(self.take_screenshots, "screenshot")
self.log("API 'screenshot' enregistrée. Prête à recevoir des requêtes.")
def take_screenshots(self, request):
### ? from here how to get my input params ?
Thanks for your help !