-
-
Notifications
You must be signed in to change notification settings - Fork 118
Configure connection to HA
After installation, this extension needs your...
- Home Assistant Root URL and a
- Long Lived Access Token
...to be able to connect to your Home Assistant Server.
There are 2 ways to get this done:
-
Via the default VS Code Settings UI
Set the values with the default settings editor of VS Code: to open the VS Code settings, go to (cmd+shift+p) 'Preferences: Open Settings (UI)', then go to 'Extensions' and then 'Home Assistant'. Please note the difference between 'User Settings' and 'Workspace Settings', by default the extension sets them on User-level but they can be overridden at workspace level.
-
Via Environment Variables
Set the
HASS_SERVER
andHASS_TOKEN
Environment Variables. This is convenient when you're using both this extension and the Home Assistant CLI. The extension will only use these Environment Variables when you have not set any setting in VS Code.Remember the scope of your environment variables differs per OS. Usually for this to work, you need to start VS Code from the from the prompt where the environment variables are set.