Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 96121

Install vscode (visual studio code) as a separate docker container

$
0
0

@cpuram wrote:

I am running my home-assistant (not HassIO) as a docker container and wanted to install vscode. Here is what I did.

  1. create local folders to hold vscode config data

mkdir /config
mkdir /config/working_folder

  1. install docker container
    docker run --name vscode --restart unless-stopped -p 8443:8443 -itd -v /config:/config -v /path_to_hass_config:/config/working_folder -e ‘TZ=Australia/Adelaide’ -e PASSWORD=xxx -e SUDO_PASSWORD=xxx linuxserver/code-server

  2. log into vscode web-ui on http://ip:8443. on the welcome page under Start, click “Add workspace folder…” and select /config/working_folder. you should be able to see all your hass config files. At this point, we have a working code editor.

  3. However to make it similar to hassio extension, with all those autofill bells and whistles, we need to install a few extensions. I fetched the list from the official addon here.

emilast.LogFileHighlighter
ESPHome.esphome-vscode
keesschollaart.vscode-home-assistant
lukas-tr.materialdesignicons-intellisense
oderwat.indent-rainbow
redhat.vscode-yaml
usernamehw.errorlens
vscode-icons-team.vscode-icons

for some reason I am unable to search for them with in vscode web-ui. so I downloaded vsix files and install them manually. here is how I did it.

a) goto vscode marker place and search for the above extensions, one at a time, and download them.
b) move those vsix files to vscode config folder
c) In the vscode web-ui, click on hamburger icon (top left) > view > extensions
d) in the extensions side bar click the 3 dots (’…’) and click “install from vsix”. under /config select and install the extensions, one by one.

  1. close the vscode web-ui (browser) and reopen it.
  2. In order to provide home-assistant access to vscode, in the settings, search for home assistant and provide url (http://ip:8123) and a long lived token.
  3. similarly you need to provide esphome url (http://ip:6052) as well.

hope this helps someone.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 96121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>