@@ -48,7 +48,7 @@ For example, applications ``my_app1`` and ``my_app2`` would be configured as:
48
48
49
49
Note that if you used the UI flow to configure pyscript, the ``allow_all_imports `` and
50
50
``hass_is_global `` configuration settings will be ignored in the yaml file. In that case
51
- you should omit them from the yaml, and just use yaml for pycript app configuration.
51
+ you should omit them from the yaml, and just use yaml for pyscript app configuration.
52
52
53
53
As explained below, the use of ``apps `` with entries for each application by name below,
54
54
is used to determine which application scripts are autoloaded. That's the only configuration
@@ -535,7 +535,7 @@ When any trigger occurs (whether time, state or event), the ``@state_active`` ex
535
535
evaluated. If it evaluates to ``False `` (or zero), the trigger is ignored and the trigger function
536
536
is not called. This decorator is roughly equivalent to starting the trigger function with an
537
537
``if `` statement with the ``str_expr `` (the minor difference is that this decorator uses the
538
- ``@state_trigger `` variable value, if present, when evalauting ``str_expr ``, whereas an
538
+ ``@state_trigger `` variable value, if present, when evaluating ``str_expr ``, whereas an
539
539
``if `` statement at the start of the function uses its current value, which might be different
540
540
if the state variable was changed immediately after the trigger, and the ``.old `` value is
541
541
not available).
@@ -992,7 +992,7 @@ makes it convenient to just reload the script file or application you are develo
992
992
affecting the others.
993
993
994
994
A much better alternative to repeatedly modifying a script file and reloading it is to use Jupyter
995
- notebook to interactively deveop and test functions, triggers and services.
995
+ notebook to interactively develop and test functions, triggers and services.
996
996
997
997
Jupyter auto-completion (with `<TAB> `) is supported in Jupyter notebook, console and lab. It should
998
998
work after you have typed at least the first character. After you hit `<TAB> ` you should see a list
@@ -1275,7 +1275,7 @@ Access to Hass
1275
1275
^^^^^^^^^^^^^^
1276
1276
1277
1277
If the ``hass_is_global `` configuration setting is set (default is off), then the variable ``hass ``
1278
- is available as a global variable in all pyscript contexts. That provides significant flexiblity
1278
+ is available as a global variable in all pyscript contexts. That provides significant flexibility
1279
1279
in accessing HASS internals for cases where pyscript doesn't provide some binding or access.
1280
1280
1281
1281
Ideally you should only use ``hass `` for read-only access. However, you do need a good understanding
@@ -1297,7 +1297,7 @@ You can use ``hass`` to compute sunrise and sunset times using the same method H
1297
1297
print (f " today sunrise = { sunrise} , sunset = { sunset} " )
1298
1298
1299
1299
Here's another method that uses the installed version of ``astral `` directly, rather than the HASS
1300
- helper function. It's a bit more crytpic since it's a very old version of ``astral ``, but you can
1300
+ helper function. It's a bit more cryptic since it's a very old version of ``astral ``, but you can
1301
1301
see how the HASS configuration values are used:
1302
1302
1303
1303
.. code :: python
@@ -1332,7 +1332,7 @@ be blocked, which will delay all other tasks.
1332
1332
1333
1333
All the built-in functionality in pyscript is written using asynchronous code, which runs seamlessly
1334
1334
together with all the other tasks in the main event loop. However, if you import Python packages and
1335
- call functions that block (eg, file or networrk I/O) then you need to run those functions outside
1335
+ call functions that block (eg, file or network I/O) then you need to run those functions outside
1336
1336
the main event loop. That can be accomplished wrapping those function calls with the
1337
1337
``task.executor `` function, which runs the function in a separate thread:
1338
1338
@@ -1440,5 +1440,5 @@ A handful of language features are not supported:
1440
1440
functions that can be called and used in-line. There is a feature request to add this.
1441
1441
1442
1442
Pyscript can call Python modules and packages, so you can always write your own native Python code
1443
- (eg, if you need a generator or other unsupported feature) that can be called by psycript
1443
+ (eg, if you need a generator or other unsupported feature) that can be called by pyscript
1444
1444
(see `Importing <#importing >`__ for how to create and import native Python modules in pyscript).
0 commit comments