{"id":162,"date":"2025-02-19T15:00:54","date_gmt":"2025-02-19T15:00:54","guid":{"rendered":"https:\/\/landrocks.world\/?p=162"},"modified":"2025-02-19T15:13:47","modified_gmt":"2025-02-19T15:13:47","slug":"visual-sudio-code-the-yaml-extension-and-home-assistants-secret-option","status":"publish","type":"post","link":"https:\/\/landrocks.world\/index.php\/2025\/02\/19\/visual-sudio-code-the-yaml-extension-and-home-assistants-secret-option\/","title":{"rendered":"Visual Sudio Code, the YAML extension and Home Assistant&#8217;s &#8220;!secret&#8221; option"},"content":{"rendered":"\n<p>I use Visual Studio Code to edit the YAML files of my Home Assistant installation. Works great. However, there is one annoying thing: The YAML extension treats the &#8220;!secret&#8221; option of Home Assistant as &#8220;Syntax error&#8221; and underlines it in red.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2148\" height=\"264\" src=\"https:\/\/landrocks.world\/wp-content\/uploads\/2025\/02\/Yaml-VS-Trouble1.png\" alt=\"\" class=\"wp-image-163\"\/><\/figure>\n\n\n\n<p>To solve this problem, open your settings.json at <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\Users\\&lt;yourusername&gt;\\AppData\\Roaming\\Code\\User\\settings.json<\/code><\/pre>\n\n\n\n<p>On my installation it looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1641\" height=\"327\" src=\"https:\/\/landrocks.world\/wp-content\/uploads\/2025\/02\/Yaml-VS-Trouble2.png\" alt=\"\" class=\"wp-image-164\"\/><\/figure>\n\n\n\n<p>After I added the code&#8230; <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>,\n    \"yaml.customTags\": &#91;\n        \"!secret scalar\"\n     ]\n<\/code><\/pre>\n\n\n\n<p>&#8230; it looked like this&#8230; <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"588\" height=\"182\" src=\"https:\/\/landrocks.world\/wp-content\/uploads\/2025\/02\/Yaml-VS-Trouble2a.png\" alt=\"\" class=\"wp-image-165\"\/><\/figure>\n\n\n\n<p>&#8230; and the problem is gone: <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2154\" height=\"259\" src=\"https:\/\/landrocks.world\/wp-content\/uploads\/2025\/02\/Yaml-VS-Trouble1a.png\" alt=\"\" class=\"wp-image-166\"\/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use Visual Studio Code to edit the YAML files of my Home Assistant installation. Works great. However, there is one annoying thing: The YAML extension treats the &#8220;!secret&#8221; option of Home Assistant as &#8220;Syntax error&#8221; and underlines it in red. To solve this problem, open your settings.json at On my installation it looks like [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,14],"tags":[],"class_list":["post-162","post","type-post","status-publish","format-standard","hentry","category-home-automation","category-software-howtos"],"_links":{"self":[{"href":"https:\/\/landrocks.world\/index.php\/wp-json\/wp\/v2\/posts\/162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/landrocks.world\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/landrocks.world\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/landrocks.world\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/landrocks.world\/index.php\/wp-json\/wp\/v2\/comments?post=162"}],"version-history":[{"count":2,"href":"https:\/\/landrocks.world\/index.php\/wp-json\/wp\/v2\/posts\/162\/revisions"}],"predecessor-version":[{"id":168,"href":"https:\/\/landrocks.world\/index.php\/wp-json\/wp\/v2\/posts\/162\/revisions\/168"}],"wp:attachment":[{"href":"https:\/\/landrocks.world\/index.php\/wp-json\/wp\/v2\/media?parent=162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/landrocks.world\/index.php\/wp-json\/wp\/v2\/categories?post=162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/landrocks.world\/index.php\/wp-json\/wp\/v2\/tags?post=162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}