pyscript
pyscript copied to clipboard
Expose as restful service
Decorating my Pyscript with @service and calling from Developer Tools as such doesn't give my any return value. I guess this a HA restriction?
I would like to write my Pyscripts in a functional way to make it automated testable outside HA so I would like create an automation in HA that:
- collects the relevant entity data
- and passes it as raw data to the service
- and receive back the response as raw data
- and update the relevant entities etc.
The question to you is if I can expose a Pyscript service as an endpoint I can reach via a restful sensor https://www.home-assistant.io/integrations/rest/ ?