Compare commits

...
3 Commits
Author SHA1 Message Date
Colin Seymour a73430c34d Add optional env vars config option (#29)
* Add optional env vars config option

* Don't use master builder

It's borked - https://github.com/home-assistant/builder/issues/212

* Use specific builder version
2024-08-11 12:22:12 +01:00
Colin Seymour 2b40dd2668 Fix Postgres link (#28)
* Don't default to old Postgres

* Fix postgres link
2024-07-22 14:48:06 +01:00
renovate[bot] 1757ed78ff Update docker/login-action action to v3.3.0 (#27)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-22 14:31:04 +01:00
7 changed files with 31 additions and 6 deletions
+2 -2
View File
@@ -35,14 +35,14 @@ jobs:
fi
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.2.0
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish
uses: home-assistant/builder@master
uses: home-assistant/builder@2024.03.5
with:
args: |
--${{ matrix.arch }} \
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v4.1.7
- name: Build add-on
uses: home-assistant/builder@master
uses: home-assistant/builder@2024.03.5
with:
args: |
--test \
+9
View File
@@ -115,6 +115,15 @@ Once you have Grafana up and running, you'll need to configure a data source to
- `import_dir`: (Optional) The path to the directory where TeslaMate should look for the TeslaMate export CSV file. Default: `/share/teslamate`.
- `env_vars`: (Optional) Set additional environment variables for TeslaMate which aren't currently exposed by the configuration options in this add-on.
Each entry is made up of a name and value:
- `name`: The case-sensitive environment variable name.
- `value`: The value to be set in the environment variable.
Note: These will also overwrite any environment variable set using the configuration options above.
## Data Import from TeslaFi
It is now possible to import CSV data from TeslaFi, refer to the [official docs][teslafi-import].
+1 -1
View File
@@ -67,7 +67,7 @@ Everything should pick up where it was before.
[addon]: https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Flildude%2Fha-addons
[addons-repo]: https://github.com/lildude/ha-addons
[alexbegium-postgres]: https://github.com/alexbelgium/hassio-addons/tree/master/postgres
[alexbelgium-postgres]: https://github.com/alexbelgium/hassio-addons/tree/master/postgres
[archs]: https://img.shields.io/badge/dynamic/json?color=green&label=Arch&query=%24.arch&url=https%3A%2F%2Fraw.githubusercontent.com%2Flildude%2Fha-addon-teslamate%2Fmain%2Fconfig.json
[docker]: https://hub.docker.com/r/teslamate/teslamate
[elixir]: https://elixir-lang.org/
+7 -2
View File
@@ -36,7 +36,8 @@
"timezone": "Europe/London",
"import_dir": "/share/teslamate",
"default_geofence": "",
"encryption_key": ""
"encryption_key": "",
"env_vars": []
},
"schema": {
"database_user": "str",
@@ -61,7 +62,11 @@
"timezone": "str",
"import_dir": "str",
"default_geofence": "str?",
"encryption_key": "password?"
"encryption_key": "password?",
"env_vars": [{
"name": "str?",
"value": "str?"
}]
},
"map": [
"share:rw"
+8
View File
@@ -44,6 +44,14 @@ export DATABASE_HOST DATABASE_NAME DATABASE_PASS DATABASE_PORT DATABASE_USER \
DISABLE_MQTT MQTT_HOST MQTT_NAMESPACE MQTT_PASSWORD MQTT_TLS_ACCEPT_INVALID_CERTS \
MQTT_TLS MQTT_USERNAME IMPORT_DIR PORT TZ DEFAULT_GEOFENCE ENCRYPTION_KEY URL_PATH
# These are optional and applied last so we can override those set above if needed.
for env_var in $(bashio::config 'env_vars|keys'); do
name=$(bashio::config "env_vars[${env_var}].name")
value=$(bashio::config "env_vars[${env_var}].value")
bashio::log.debug "Setting Env Variable ${name} to ${value}"
export "${name}=${value}"
done
# Import dashboards
if bashio::config.true 'grafana_import_dashboards'; then
/dashboards.sh restore
+3
View File
@@ -67,3 +67,6 @@ configuration:
import_dir:
name: TeslaFi Import Directory
description: The directory which holds the TeslaFi export you would like to import into TeslaMate.
env_vars:
name: Environment Variables
description: Set additional environment variables for TeslaMate which aren't currently exposed by the configuration options in this add-on.