Skip to content

Commit 4bc610e

Browse files
authored
Update config to enable hassio_api access and improve TeslaMate settings message (#79)
* Addon needs hassio API access * Fix TeslaMate config behaviour
1 parent 48cc287 commit 4bc610e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"aarch64",
1010
"amd64"
1111
],
12+
"hassio_api": true,
1213
"ingress": true,
1314
"init": false,
1415
"panel_icon": "mdi:car-connected",

rootfs/etc/s6-overlay/s6-rc.d/teslamate/run

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,12 @@ else
7676
exit 1
7777
fi
7878

79-
if [[ -z $(PGPASSWORD="$DATABASE_PASS" psql -h "$DATABASE_HOST" -p "$DATABASE_PORT" -U "$DATABASE_USER" "$DATABASE_NAME" -Atqc "SELECT 1 FROM settings WHERE base_url LIKE '%api/hassio_ingress%'" 2&> /dev/null ) ]]; then
79+
if [[ -z $(PGPASSWORD="$DATABASE_PASS" psql -h "$DATABASE_HOST" -p "$DATABASE_PORT" -U "$DATABASE_USER" "$DATABASE_NAME" -Atqc "SELECT 1 FROM settings WHERE base_url LIKE '%api/hassio_ingress%'" 2> /dev/null ) ]]; then
8080
teslamate_ingress=$(bashio::addon.ingress_entry)
8181
grafana_ingress=$(bashio::addon.ingress_entry $(bashio::supervisor.addons | grep grafana))
82+
if [[ "$teslamate_ingress" == "$grafana_ingress" ]]; then
83+
grafana_ingress="** Grafana addon not found. Ensure the addon is installed and running. **"
84+
fi
8285

8386
bashio::log.info "Configure TeslaMate settings by adding these values
8487
to the URL you use to access your Home Assistant instance:

0 commit comments

Comments
 (0)