YAML... SOOO Much red

does anyone know why it looks like this using Studio Code Server? It works just fine.

my configuation file also has red on just that line, again, it works fine, but what’s up with the red?

Your indentations are weak, just from seeing the image. I’d assume that’s why Studio Code Server is having a stroke. It needs proper syntax. But I don’t know for sure, cause I don’t use Studio Code Server. It could just be a built-in feature whenever new code is added to a file, it’ll appear as red. What happens when you save and re-open?

EDIT Upon further inspection, Studio Code Server is providing warnings on each line. A search in the forums show other posts about it with a consensus that a lot of the “disallowedextraprop” warnings can be ignored because Studio Code Server is behind on recognizing HA yaml structure/syntax.

how so? what is wrong with it? like I said, it works

Initially, I’m assuming this file is being used as an include. I would’ve prepended the yaml structure to include 2 spaces from the key in the main config file.

But again, the warnings themselves look like they can be ignored according to other posts on the forum, especially considering things are working as you’re expecting.

your yaml is fine, the app/addon is reporting bullshit.

2 Likes

:laughing: and there you have it! @petro knows what’s on the up-and-up.

is there a better addon/program to use that works better with HA? understands HA’s yaml, etc?

To make sure your extension is up-to-date, check it.

  • In your code server (vscode) window
  • click extensions icon in the left window
    image
  • search for home assistant
  • click on it make sure it’s up to date.

I’ve seen it out of sync on my system, and updating it fixed a bunch of the mess.

If that’s up to date, go to the repo and add issue for your findings or better yet, contribute some fixes.

I see only this, and there does not appear to be a way to update it, or even see the current version

There will be a flag near the top if it needs update.

Even though your YAML works, all the scenarios are coded specifically and not all valid YAML configs will show as valid.
It is set up such that every syntax sequence is bad unless it’s a syntax sequence that’s on the good list.

My guess with those is something above that is confusing it.

In so far as I can tell there’s no way to update the extension when using the HA App (formerly known as Addon), hope I’m wrong. I had to stop updating the App after 5.19.3 as I couldn’t stand the distraction.

Here you go: Blueprint Studio. It’s in HACS.

1 Like