Home Assistant Community Add-on: Visual Studio Code

Are you on Home Assistant .113? The MDI icon for VS Code changed on .113, so the add-on was updated to use the new icon. If you’re on an older version of Home Assistant, it probably can’t find the icon by the new name.

1 Like

Damn, im sorry. My mistake. Thanks!

Hi, is there a way to install on HA core ? Or is only available for HA supervised ?

Thx in advance,

Simone

Sure - you can run VS Code Server alongside HA Core. You just have to install/configure/integrate it yourself.

There’s a docker image: https://hub.docker.com/r/codercom/code-server

And you’ll probably want to configure a few extensions, most importantly the Home Assistant Config Helper. But this is a thread for the community add-on, so details are out-of-scope here.

1 Like

hello, after the last update the icon on the sidebar is missing. any idea how to get it back?
image

Upgrade to Home Assistant Core 0.113.0 or newer.

thanks. that solved it :slight_smile:

I have a couple of strange annoyances that occur when I copy/paste code from VSC, either to another part of the same yaml file or to this forum.

  1. When I copy code to the same (or even another) yaml file the indentation gets messed up. Generally the first line of the pasted section is indented an additional 4 spaces and the rest 2
  2. When I paste into this forum I end up with an entire blank line in between each line of code.

Is anyone else having this same behaviour?

3 Likes

Yes to #1. It is making me crazy not to be able to copy blocks of code within the same file, or file to file, without ending up with a formatting mess. :slightly_frowning_face:

Hi ,

In HAOS version 0113.3 , this Home Assistant Community Addon it is still unvailable

This add-on is not available on your system.

When will it be available ?
Thank you

The add-on is only available for 64-bit installs and is not recommended for systems with under 4 GB ram.

Thank you for the clarification

Any instructions/advice on how to setup GitHub authorization? All my attempts so far point to the “Please restart the sign in process from the editor.” or “The input did not matched the expected format” errors:


1 Like

Yep, just trying this out for the first time today, and I’m getting exactly this (#1).

If I repeatedly past the same chunk, each new chunk is indented a bit more. It feels like it is assuming the new pasted line is part of the previous chunk because it was not “closed”.

I experimented by creating a dummy.txt file with the add-on and pasting the same text multiple times into that. It did not have the same issue.

Hi, any idea why I get this error, I can´t see anything wrong:

String does not match the pattern of “^sensor.(?!)[\da-z]+(?<!)\s?(?:,\s?sensor.(?!)[\da-z_]+(?<!_))*$”.

It appears for this condition on the entity_id row:

- condition: numeric_state
  entity_id: sun.sun
  value_template: '{{ state.attributes.elevation }}'
  below: 3.5

I have “sun:” in my basic config and the entity sun.sun is present.

Best regards

I had the same issue, I changed to this config and the error goes away and removes 2 lines of code as well.

- condition: template
  value_template: '{{ state_attr("sun.sun", "elevation") < 10 }}'
1 Like

I think this formatting is correct, but getting an error. The code works though :man_shrugging:

Capture

Thanks, makes sense now and I see the documentation for this condition is updated as well.

However I have the same problem for a trigger as well.
And this one is 100% according to documentation:

trigger:
  platform: numeric_state
  entity_id: sun.sun
  value_template: "{{ state_attr('sun.sun', 'elevation') }}"
  above: 4.0

Here also the entity line gives the same error.

String does not match the pattern of “^sensor.(?!)[\da-z]+(?<!)\s?(?:,\s?sensor.(?!)[\da-z_]+(?<!_))*$”.

to this…

trigger:
  platform: template
  value_template: '{{ state_attr("sun.sun", "elevation") > 4 }}'

It’s probably just an error in the code of the add-on, but again, you can streamline the code and remove some text :slight_smile:

1 Like

I have a fresh install of Home Assistant running on ProxMox behind a Synology reverse proxy. I am able to access the fantastic Visual Studio from Safari externally and internally, but from Chrome it only works externally. Not a big problem, but any idea why? Anyway: Thanks for a wonderful add-on :slight_smile: