substitutions: Don't warn when passwords look like a substitution (#4161)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
tljuniper 2023-03-05 21:28:46 +01:00 committed by GitHub
parent b8ca40170e
commit 7466773ac8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,7 +66,7 @@ def _expand_substitutions(substitutions, value, path, ignore_missing):
if name.startswith("{") and name.endswith("}"): if name.startswith("{") and name.endswith("}"):
name = name[1:-1] name = name[1:-1]
if name not in substitutions: if name not in substitutions:
if not ignore_missing: if not ignore_missing and "password" not in path:
_LOGGER.warning( _LOGGER.warning(
"Found '%s' (see %s) which looks like a substitution, but '%s' was " "Found '%s' (see %s) which looks like a substitution, but '%s' was "
"not declared", "not declared",