|
1 | 1 | Configuration
|
2 | 2 | =============
|
3 | 3 |
|
4 |
| -- Pyscript can be configured using the UI, or via yaml. To use the UI, go to the |
5 |
| - Configuration -> Integrations page and selection "+" to add ``Pyscript Python scripting``. |
6 |
| - After that, you can change the settings anytime by selecting Options under Pyscript |
7 |
| - in the Configuration page. |
| 4 | +- Pyscript can be configured using the UI, or via yaml. To use the UI, go to the |
| 5 | + Configuration -> Integrations page and selection "+" to add ``Pyscript Python scripting``. |
| 6 | + After that, you can change the settings anytime by selecting Options under Pyscript |
| 7 | + in the Configuration page. |
8 | 8 |
|
9 |
| - Alternatively, for yaml configuration, add ``pyscript:`` to ``<config>/configuration.yaml``. |
10 |
| - Pyscript has two optional configuration parameters that allow any python package to be |
11 |
| - imported and exposes the ``hass`` variable as a global (both options default to ``false``): |
| 9 | + Alternatively, for yaml configuration, add ``pyscript:`` to ``<config>/configuration.yaml``. |
| 10 | + Pyscript has two optional configuration parameters that allow any python package to be |
| 11 | + imported and exposes the ``hass`` variable as a global (both options default to ``false``): |
12 | 12 |
|
13 |
| - .. code:: yaml |
| 13 | + .. code:: yaml |
14 | 14 |
|
15 |
| - pyscript: |
16 |
| - allow_all_imports: true |
17 |
| - hass_is_global: true |
| 15 | + pyscript: |
| 16 | + allow_all_imports: true |
| 17 | + hass_is_global: true |
18 | 18 |
|
19 |
| -- Add files with a suffix of ``.py`` in the folder ``<config>/pyscript``. |
20 |
| -- Restart HASS after installing pyscript. |
21 |
| -- Whenever you change a script file, app or configuration, make a ``reload`` service call to ``pyscript`` |
22 |
| - and just those changes will be reloaded. To reload all files and apps, set the optional ``global_ctx`` |
23 |
| - parameter to ``*``. |
24 |
| -- Watch the HASS log for ``pyscript`` errors and logger output from your scripts. |
| 19 | +- Add files with a suffix of ``.py`` in the folder ``<config>/pyscript``. |
| 20 | +- Restart HASS after installing pyscript. |
| 21 | +- Whenever you change a script file or app, pyscript will automatically reload the changed files. |
| 22 | + To reload all files and apps, call the ``pyscript.reload`` service with the optional |
| 23 | + ``global_ctx`` parameter to ``*``. |
| 24 | +- Watch the HASS log for ``pyscript`` errors and logger output from your scripts. |
0 commit comments