"WARNING Found '*' (see wifi->password) which looks like a substitution, but 'B7' was not declared"

WARNING Found 'YkYLh6x27qZDS3SX@ctRuvYT*TnYcjr9bK$7DEHbV*E6ekC5oovA4v@gUPWpufG' (see wifi->password) which looks like a substitution, but 'B7' was not declared

So this isn’t the exact warning as that one contains my wifi password, but I regenerated another with the same underlying parameters.

Is “substitution” related to secrets.yaml? What is B7? I’ve done some searching, but only found people talking about it, but not documentation saying what it actually is.

Would like some short explanation that will help me understand and research it further.
Thanks again!

1 Like

It’s hard to say since you say you edited the error message, but my guess is that you have something that looks like “${B7}” in your password. This is the general format of a substitution request - “${” and “}” surrounding the key for the substitution, which in this example is “B7” and the error is saying that there is no defined substitution for B7.

Substitutions are defined in a “substitutions:” section of your configuration file (I’m guessing you don’t have any substitutions defined) - https://esphome.io/guides/configuration-types.html#substitutions

Maybe what you have is a different format, but I’m guessing something in your password makes it looks like you are trying to substitute a value defined as “B7” but you have defined no such substitution. Looking at the link I gave, it seems like the curly braces are not used in some cases, so perhaps you just have $B7 in your password without the braces?

You’d need to put a \ before the $ to tell ESPHome not to treat the $ as a special character,

my wifi password is “Pas$word”. I put \ so it’s “Pas$word” and I get this error

ERROR Error while reading config: Invalid YAML syntax:

while scanning a double-quoted scalar
  in "/config/esphome/configuration/secrets.yaml", line 3, column 16:
    wifi_password: "Pas\$word"
                   ^
found unknown escape character '$'
  in "/config/esphome/configuration/secrets.yaml", line 3, column 21:
    wifi_password: "Pas\$word"

I have the $ symbol in my password too.
In my case I’m receiving the same warning, but after flashing all is working as expected.
You can ignore it

i appreciate that it is just a cosmetic issue but found it annoying that it’s displaying my pwd when I check the log. not big deal. thanks

I only saw it when flashing and only the part of the password afther the $, but I haven’t updated to the latest version yet.
It is now displayed in other place?

Same here, it shows when flashing but it also shows when just viewing the logs wirelessly, which isn’t great

Did anybody find a solution for this?

Same here, does anybody find out something?

10 months later same subject.
Annoying in my case because the password is sensitive and is displayed several times during UPDATE ALL (obviously).

I guess two+ years later now. I am still seeing the same issue.
Is there a path to collaborate with fixes from the community?