Skip to content

Commit 76b0f4c

Browse files
committed
update docs
1 parent 6b1018b commit 76b0f4c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docs/new_features.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ The new features since 0.32 in master include:
3737
@dlashua (#50, #62).
3838
- Required Python packages can be specified in ``requirements.txt`` files at the top-level pyscript
3939
directory, and each module's or app's directory. Those files are read and any missing packages are
40-
installed on HASS startup and pyscript reload. Contributed by @raman325 (#66, #68, #69).
40+
installed on HASS startup and pyscript reload. If a specific version of a package is needed, it must be
41+
pinned using the format 'package_name==version'. Contributed by @raman325 (#66, #68, #69, #70, #78).
4142
- State variable attributes can be set by direct assignment, eg: ``DOMAIN.name.attr = value``. A
4243
equivalent new function ``state.setattr()`` allows a specific attribute to be set.
4344
- The ``state.get_attr()`` function has been renamed ``state.getattr()``. The old function is

docs/reference.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,9 +1090,12 @@ version of that package, eg:
10901090
10911091
# this is a comment
10921092
aiohttp
1093-
amazing_stuff>=3.1
1093+
amazing_stuff==3.1
10941094
another_package==5.1.2
10951095
1096+
When a specific version of a package is required, the ``==`` specifier must be used. Unpinned packages
1097+
(no version specified) are also accepted.
1098+
10961099
Each app's or module's directory (assuming they use the directory-form of a package) can also
10971100
contain an optional ``requirements.txt`` file:
10981101

@@ -1108,6 +1111,9 @@ If a required package version differs from the installed one, no change is made
11081111
HASS has a requirement that pyscript should not change. In that case a warning message will be
11091112
logged and the requirement will be skipped.
11101113

1114+
When a package appears multiple times across all of your ``requirements.txt`` definitions, the
1115+
highest version specified will be installed.
1116+
11111117
Trigger Closures
11121118
^^^^^^^^^^^^^^^^
11131119

0 commit comments

Comments
 (0)