-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-discover Home Assistant when running inside an add-on #3283
Conversation
We should be able to get rid of these lines once this is merged. |
@@ -54,6 +54,10 @@ export class ConfigurationService implements IConfigurationService { | |||
if (!this.token && process.env.HASS_TOKEN) { | |||
this.token = process.env.HASS_TOKEN; | |||
} | |||
if (!this.url && !this.token && process.env.SUPERVISOR_TOKEN) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what the above HASS_SERVER & HASS_TOKEN originally tried to solve.
That said, not against this addition as it allows a little clean up on the add-on part.
../Frenck
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frenck, only the VS Code add-on exposes HASS_SERVER
and HASS_TOKEN
. This change is mainly for other add-ons, like Advanced Terminal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I get that, but I can clean that part up after this one 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly. Great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @felipecrs 👍
../Frenck
Add-ons have
SUPERVISOR_TOKEN
set as environment variable (for example Terminal add-on when running from VS Code Remote SSH. But even the regular VS Code add-on should have it.