@@ -18,10 +18,15 @@ The new features since 0.32 in master include:
18
18
19
19
- Pyscript state variables (entity_ids) can be persisted across pyscript reloads and HASS restarts,
20
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).
21
24
- ``@state_trigger `` now supports triggering on an attribute change with ``"domain.entity.attr" `` and
22
25
any attribute change with ``"domain.entity.*" ``, from @dlashua (#82)
23
26
- State variables now support virtual attributes ``last_changed `` and ``last_updated `` for the UTC time when state
24
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.
25
30
- State variable values (eg, from ``domain.entity `` or ``state.get() ``) now include attributes that can be accessed
26
31
after they are assigned to another, normal, variable.
27
32
- ``@state_trigger `` and ``task.wait_until `` now have an optional ``state_hold `` duration in seconds that requires
@@ -43,15 +48,10 @@ The new features since 0.32 in master include:
43
48
directory, and each module's or app's directory. Those files are read and any missing packages are
44
49
installed on HASS startup and pyscript reload. If a specific version of a package is needed, it must be
45
50
pinned using the format 'package_name==version'. Contributed by @raman325 (#66, #68, #69, #70, #78).
46
- - State variable attributes can be set by direct assignment, eg: ``DOMAIN.name.attr = value ``.
47
- An equivalent new function ``state.setattr() `` allows a specific attribute to be set.
48
51
- The reload service now takes an optional parameter ``global_ctx `` that specifies just that
49
52
global context is reloaded, eg: ``global_ctx="file.my_scripts" ``. Proposed by @dlashua (#63).
50
53
- The ``state.get_attr() `` function has been renamed ``state.getattr() ``. The old function is
51
- still available and will be removed in some future release.
52
- - Entities ``DOMAIN.ENTITY `` now support a virtual method ``SERVICE `` (eg, ``DOMAIN.ENTITY.SERVICE() ``)
53
- that calls the service ``DOMAIN.SERVICE `` for any service that has an ``entity_id `` parameter, with
54
- that ``entity_id `` set to ``DOMAIN.ENTITY ``. Proposed by @dlashua (#64).
54
+ still available and will be removed in some future release (it logs a warning when used).
55
55
- VSCode connections to pyscript's Jupyter kernel now work. Two changes were required: VSCode immediately
56
56
closes the heartbeat port, which no longer causes pyscript to shut down the kernel. Also, ``stdout ``
57
57
messages are flushed prior to sending the execute complete message. This is to ensure `log ` and `print `
0 commit comments