-
I would like using a pyscript function in an automation/script of Home assistant like a template.
HA Script:
and return 2 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Service Calls cannot return data. So, at this this particular way won't work. There are ways with regular python to inject a function into the Jinja Template engine. You could follow that path and see if there's a pyscript way to hook into that process. |
Beta Was this translation helpful? Give feedback.
-
Thanks, I'll do everything with pyscript. |
Beta Was this translation helpful? Give feedback.
Service Calls cannot return data. So, at this this particular way won't work. There are ways with regular python to inject a function into the Jinja Template engine. You could follow that path and see if there's a pyscript way to hook into that process.