@@ -8,66 +8,19 @@ You can also install the master (head of tree) version from GitHub, either using
8
8
Because pyscript has quite a few unit tests, generally master should work ok. But it's not guaranteed
9
9
to work at any random time.
10
10
11
- The latest release is 0.32 , released on October 21 , 2020. Here is the `stable documentation <https://hacs-pyscript.readthedocs.io/en/stable >`__
11
+ The latest release is 1.0.0 , released on November 9 , 2020. Here is the `stable documentation <https://hacs-pyscript.readthedocs.io/en/stable >`__
12
12
for that release.
13
13
14
14
Since that release, the master (head of tree) version in GitHub has several new features and bug fixes.
15
15
Here is the master `latest documentation <https://hacs-pyscript.readthedocs.io/en/latest >`__.
16
16
17
- The new features since 0.32 in master include:
17
+ Planned new features post 1.0.0 include:
18
18
19
- - Pyscript state variables (entity_ids) can be persisted across pyscript reloads and HASS restarts,
20
- from @swazrgb and @dlashua (#48).
21
- - Entities ``domain.entity `` now support a virtual method ``service `` (eg, ``domain.entity.service() ``)
22
- that calls the service ``domain.service `` for any service that has an ``entity_id `` parameter, with
23
- that ``entity_id `` set to ``domain.entity ``. Proposed by @dlashua (#64).
24
- - ``@state_trigger `` now supports triggering on an attribute change with ``"domain.entity.attr" `` and
25
- any attribute change with ``"domain.entity.*" ``, from @dlashua (#82)
26
- - State variables now support virtual attributes ``last_changed `` and ``last_updated `` for the UTC time when state
27
- values or any attribute was last changed.
28
- - State variable attributes can be set by direct assignment, eg: ``DOMAIN.name.attr = value ``.
29
- An equivalent new function ``state.setattr() `` allows a specific attribute to be set.
30
- - State variable values (eg, from ``domain.entity `` or ``state.get() ``) now include attributes that can be accessed
31
- after they are assigned to another, normal, variable.
32
- - ``@state_trigger `` and ``task.wait_until `` now have an optional ``state_hold `` duration in seconds that requires
33
- the state trigger to remain true for that period of time. The trigger occurs after that time elapses. If the state
34
- trigger changes to false before the time expires, the process of waiting for a new trigger starts over.
35
- - ``@time_active `` now has an optional ``hold_off `` duration in seconds, which ignores a new trigger if the last
36
- one happened within that time. Can be used for rate limiting or debouncing. Also, ``@time_active `` can now take
37
- zero time range arguments, in case you want to just specify ``hold_off ``.
38
- - The ``hass `` object is available in all pyscript global contexts if the ``hass_is_global `` configuration parameter
39
- is true (default false). This allows access to HASS internals that might not be otherwise exposed by pyscript.
40
- Use with caution (#51).
41
- - Improvements to UI config flow, including allowing parameters to be updated, and the UI reload now works the same
42
- as the ``pyscript.reload `` service call, from @raman325 (#53)
43
- - Added inbound ``context `` variable to trigger functions and support optional ``context `` setting on state,
44
- event firing and service calls. Proposal and PR from @dlashua (#50, #60).
45
- - Logbook now supported using ``context `` and informational message based on trigger type. Proposal and PR
46
- from @dlashua (#50, #62).
47
- - Required Python packages can be specified in ``requirements.txt `` files at the top-level pyscript
48
- directory, and each module's or app's directory. Those files are read and any missing packages are
49
- installed on HASS startup and pyscript reload. If a specific version of a package is needed, it must be
50
- pinned using the format 'package_name==version'. Contributed by @raman325 (#66, #68, #69, #70, #78).
51
- - The reload service now takes an optional parameter ``global_ctx `` that specifies just that
52
- global context is reloaded, eg: ``global_ctx="file.my_scripts" ``. Proposed by @dlashua (#63).
53
- - The ``state.get_attr() `` function has been renamed ``state.getattr() ``. The old function is
54
- still available and will be removed in some future release (it logs a warning when used).
55
- - VSCode connections to pyscript's Jupyter kernel now work. Two changes were required: VSCode immediately
56
- closes the heartbeat port, which no longer causes pyscript to shut down the kernel. Also, ``stdout ``
57
- messages are flushed prior to sending the execute complete message. This is to ensure `log ` and `print `
58
- messages get displayed in VSCode. One benign but unresolved bug with VSCode is that when you connect
59
- to the pyscript kernel, VSCode starts a second pyscript Jupyter kernel, before shutting that second one
60
- down.
61
- - Service calls now accept ``blocking `` and ``limit `` parameters. The default behavior for a service call is
62
- to run it in the background, but using ``blocking=True `` will force a task to wait up to ``limit `` seconds
63
- for the service call to finish executing before continuing. Contributed by @raman325 (#85).
19
+ - ``del `` can delete state variables and state variable attributes
20
+ - use ``aionofity `` to auto-reload newly written script files, at least on linux (#74)
21
+ - consider allowing native Python functions inside pyscript (#71)
22
+ - consider implementing function decorators (#43)
64
23
65
- The bug fixes since 0.32 in master include:
24
+ The new features since 1.0.0 in master include:
66
25
67
- - The ``@state_trigger `` expression is only evaluated when at least one of specific state variable
68
- or attribute values mentioned in the expression have changed; fixed by @dlashua (#82).
69
- - Jupyter autocomplete now works on multiline code blocks.
70
- - Improved error message reporting for syntax errors inside f-strings.
71
- - Fixed incorrect global context update on calling module that, in turn, does a callback (#58).
72
- - ``task.wait_until `` no longer silently ignores unrecognized keyword arguments (#80).
73
- - ``task.wait_until `` incorrectly ignored the keyword optional state_check_now argument (#81).
26
+ - None so far
0 commit comments