Skip to content

Commit

Permalink
Fix issue #10 with ha_token argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeweerd committed Oct 4, 2023
1 parent 9cf8cdb commit 55b87b8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ Dans les 2 cas, il faudra configurer l'Add-on, le démarrer, et
[définir un automatisme](#automatisation-home-assistant-appdaemon) pour
déclencher l'événement.

Note: Les paramètres `ha_server` et `ha_token` ne doivent pas être
renseignés lorsque l'add-on doit alimenter le Home Assistant de la même
installation.

#### Home Assistant Add-On - méthode manuelle

Ajouter https://github.com/mdeweerd/MetersToHA comme Dépôt à travers le
Expand Down
4 changes: 2 additions & 2 deletions addon_meterstoha/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if bashio::config.has_value ha_server ; then
fi

if bashio::config.has_value ha_token ; then
HA_SERVER="$(bashio::config ha_token)"
HA_TOKEN="$(bashio::config ha_token)"
fi

if bashio::config.has_value DISPLAY ; then
Expand Down Expand Up @@ -156,7 +156,7 @@ cat > "$CONFIG_FILE" <<EOJSON
{
$config
"ha_server": "$HA_SERVER",
"ha_token": "$SUPERVISOR_TOKEN",
"ha_token": "$HA_TOKEN",
"type": "$TYPE"
}
EOJSON
Expand Down
9 changes: 7 additions & 2 deletions addon_meterstoha/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ configuration:
example: "21546020012301"
ha_server:
name: Home Assistant Server
description: Home Asistant Server to send data to
description:
Do not fill when Add-on is installed on the same server as Home Asistant. Only
needed for remote servers in Add-on mode, in which case this is the url of the
remote server.
example: https://subdomain.domain.name
ha_token:
name: Home Assistant Token
description: Long Lived Token created on your Home Assistant Server for MetersToHA
description:
Do not fill when Add-on is installed on the same server as Home Asistant. Long
Lived Token created on your Home Assistant Server for MetersToHA.
example: WViNTMzMjAyM2RkMiIsIm-OvEn0_QKLscaKcXVA_ecQoHVwRVYYv5pzA0eyJ0eXAiOiJKV1QiLCJ.eyJpc3MiOiI1OhbGciOiJIUzI1NiJ9WNjODg5NjRjMGI0YzM5OGZhOlhdCI6MTY1Mzg1MDY0OSwiZXhwIjoxOTY5MjEwNjQ5fQ.jkOiQUi
timeout:
name: Connection/Step Timeout
Expand Down
10 changes: 8 additions & 2 deletions addon_meterstoha/translations/fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@ configuration:
example: "21546020012301"
ha_server:
name: Seveur Home Assistant
description: Serveur Home Assistant vers lequel envoyer les données
description:
Laisser vide si le Module Complémentaire (Add-on) sert à Home Assistant
sur la même machine. Utile seulement en cas d'un serveur distant. Dans ce
cas c'est l'adresse du serveur distant.
example: https://subdomain.domain.name
ha_token:
name: Clé API Home Assistant
description: Long Lived Token created on your Home Assistant Server for MetersToHA
description:
Laisser vide si le Module Complémentaire (Add-on) sert à Home Assistant
sur la même machine. Sinon si c'est le Jeton d'accès longue durée à créer sous
Compte>Profil>Jetons d'accès longue durée.
example: WViNTMzMjAyM2RkMiIsIm-OvEn0_QKLscaKcXVA_ecQoHVwRVYYv5pzA0eyJ0eXAiOiJKV1QiLCJ.eyJpc3MiOiI1OhbGciOiJIUzI1NiJ9WNjODg5NjRjMGI0YzM5OGZhOlhdCI6MTY1Mzg1MDY0OSwiZXhwIjoxOTY5MjEwNjQ5fQ.jkOiQUi
timeout:
name: Délai d'expiration
Expand Down

0 comments on commit 55b87b8

Please sign in to comment.