mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-02-11 00:52:43 +01:00
Add note about remote package secrets (and fix lint.py) (#1943)
This commit is contained in:
parent
4cf5787e11
commit
5b89b2a0f2
@ -361,6 +361,11 @@ Packages can also be loaded from a git repository by utilizing the correct confi
|
||||
:ref:`config-substitutions` can be used inside the remote packages which allows users to override
|
||||
them locally with their own subsitution value.
|
||||
|
||||
.. note::
|
||||
|
||||
Remote packages cannot have ``secret`` lookups in them. They should instead make use of substitutions with an
|
||||
optional default in the packaged YAML, which the local device YAML can set using values from the local secrets.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
packages:
|
||||
|
18
lint.py
18
lint.py
@ -356,8 +356,12 @@ def lint_directive_formatting(fname, content):
|
||||
# Empty line must follow
|
||||
if lines[j]:
|
||||
errors.append(
|
||||
"Directive '{}' is not followed by an empty line. Please insert an "
|
||||
"empty line after {}:{}".format(directive_name, f, j)
|
||||
(
|
||||
j,
|
||||
1,
|
||||
"Directive '{}' is not followed by an empty line. Please insert an "
|
||||
"empty line after {}:{}".format(directive_name, fname, j),
|
||||
)
|
||||
)
|
||||
continue
|
||||
|
||||
@ -374,11 +378,17 @@ def lint_directive_formatting(fname, content):
|
||||
num_indent = num_spaces - base_indentation
|
||||
if j == k and num_indent != 4:
|
||||
errors.append(
|
||||
"Directive '{}' must be indented with 4 spaces, not {}. See "
|
||||
"{}:{}".format(directive_name, num_indent, f, j + 1)
|
||||
(
|
||||
j + 1,
|
||||
num_indent,
|
||||
"Directive '{}' must be indented with 4 spaces, not {}. See "
|
||||
"{}:{}".format(directive_name, num_indent, fname, j + 1),
|
||||
)
|
||||
)
|
||||
break
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
@lint_re_check(
|
||||
r"https://esphome.io/",
|
||||
|
Loading…
Reference in New Issue
Block a user