* Add response to python_script
* Reset output to empty dict if not valid dict
* Add tests for python_script response
* Raise Exceptions on service execution
* Add info on exception type
* Raise ServiceValidationError instead of ValueError
* Raise only on return_response=True
* Fix exception logger if no service response
* Create issue if exception is not raised
* Revert "Create issue if exception is not raised"
This reverts commit a61dd8619f.
---------
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
Using the locals parameter makes it so that the code of a Python script runs as
if it were in the body of a ``class``. One effect of this is that functions
defined as part of a script cannot call one another directly.
Fixes: #24704, #13653
* Load user-provided descriptions for python_scripts
* Import SERVICE_DESCRIPTION_CACHE
* Use async_set_service_schema to register service descriptions
* Add python_script tests for loading service descriptions
* Use async/await in test