Update python_script.markdown (#32579)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
koopee 2024-05-03 13:27:25 +03:00 committed by GitHub
parent 363b785b29
commit 75463f1522
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,7 +129,7 @@ The above `python_script` can be called using the following YAML as an input.
rgb_color: [255, 0, 0]
```
Services can also respond with data. Retrieving this data in your Python script can be done by setting the `blocking` and `return_response` arguments of the `hass.services.call` function to `True`. This is shown in the example below, in this case, retrieving the weather forecast and putting it into a variable:
Services can also respond with data. Retrieve this data in your Python script by setting the `blocking` and `return_response` arguments of the `hass.services.call` function to `True`. The example below retrieves the weather forecast and assigns it to the `current_forecast` variable:
```python
# get_forecast.py