add "homeassistant_api: true" to config.yaml #112
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Will allow evcc HA addon to make API calls to your homeassistant host using the HA supervisor. Removes the need for a long lived access token and a call to the IP adres of your. More info in the docs https://developers.home-assistant.io/docs/add-ons/communication/
Will make API call possible in this form from within the the evcc.io add-on docker container.
curl -X GET -H "Authorization: Bearer ${SUPERVISOR_TOKEN}" -H "Content-Type: application/json" http://supervisor/core/api
In evcc.yaml a custom http sensor would then should look something like this:
->I write should, because I haven't found a way to use the environment variable in evcc.yaml. I have confirmed it is availalble in the container and hard code the value will get the api to work. Anyone with more evcc or go experience with a tip on how to use ${SUPERVISOR_TOKEN} in evcc.yaml?