@@ -29,10 +29,9 @@ Pyscript implements a Python interpreter using the ast parser output, in a fully
29
29
allows several of the "magic" features to be implemented in a seamless Pythonic manner, such as
30
30
binding of variables to states and functions to services. Pyscript supports imports, although the
31
31
valid import list is restricted for security reasons. Pyscript does not (yet) support some language
32
- features like declaring new objects, list comprehensions, generators and some syntax like ` with `
33
- and ` yield ` . Pyscript provides a handful of additional built-in functions that connect to HASS
34
- features, like logging, accessing state variables as strings (if you need to compute their names
35
- dynamically), sleeping and waiting for triggers.
32
+ features like generators and some syntax like ` with ` and ` yield ` . Pyscript provides a handful of
33
+ additional built-in functions that connect to HASS features, like logging, accessing state variables
34
+ as strings (if you need to compute their names dynamically), sleeping and waiting for triggers.
36
35
37
36
Pyscript also provides a kernel that interfaces with the Jupyter front-ends (eg, notebook, console
38
37
and lab). That allows you to develop and test pyscript code interactively. Plus you can interact
@@ -85,7 +84,12 @@ this [README](https://github.com/craigbarratt/hass-pyscript-jupyter/blob/master/
85
84
86
85
## Configuration
87
86
88
- * Add ` pyscript: ` to ` <config>/configuration.yaml ` ; pyscript doesn't have any configuration settings
87
+ * Add ` pyscript: ` to ` <config>/configuration.yaml ` ; pyscript has one optional
88
+ configuration parameter that allows any python package to be imported if set, eg:
89
+ ``` yaml
90
+ pyscript :
91
+ allow_all_imports : true
92
+ ` ` `
89
93
* Create the folder ` <config>/pyscript`
90
94
* Add files with a suffix of `.py` in the folder `<config>/pyscript`.
91
95
* Restart HASS.
0 commit comments