esphome/esphome-vscode

$ Not Allowed in Node, But Using Substitution

efaden opened this issue · 1 comments

So I have a bunch of template yaml files I use to assemble individual device files. Those templates often include the esp section and thus the node name. Normally the node name doesn't allow a $, but you are allowed to use substitutions. The extension is however giving me an error that$ isn't allowed. Maybe allowing ${} and not just $ or something would be convenient.

I will not fix this particular issue, let me explain why:

The issue here is happening in a file which cannot be validated directly, i.e. it must be validated from another file which in turns validates this file and then everything works.
The extension understand this, but it needs you to validate the principal file first, at least once, then it learns that this file is included by another file and when you make changes to the included file it will validate it properly (your error in the $ should go away)