From 81786bc1a730cf31c35c8c0428f6f9bf51c49ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Senart?= <> Date: Wed, 15 Jan 2025 22:54:49 +0100 Subject: [PATCH 1/2] [#38] Using the HA addon, the PCE identifier is transformed into another number. --- .../app/config/configuration.template.yaml | 20 +++++++++---------- .../rootfs/app/config/secrets.template.yaml | 12 +++++------ config/secrets.template.yaml | 14 ++++++------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/addons/gazpar2haws/rootfs/app/config/configuration.template.yaml b/addons/gazpar2haws/rootfs/app/config/configuration.template.yaml index 7b2069d..c22f182 100644 --- a/addons/gazpar2haws/rootfs/app/config/configuration.template.yaml +++ b/addons/gazpar2haws/rootfs/app/config/configuration.template.yaml @@ -1,22 +1,22 @@ logging: file: log/gazpar2haws.log - console: true + console: true level: debug - format: '%(asctime)s %(levelname)s [%(name)s] %(message)s' + format: "%(asctime)s %(levelname)s [%(name)s] %(message)s" grdf: scan_interval: ${GRDF_SCAN_INTERVAL} # Number of minutes between each data retrieval (0 means no scan: a single data retrieval at startup, then stops). devices: - - name: gazpar2haws # Name of the device in home assistant. It will be used as the entity_id: sensor.${name}. - username: "!secret grdf.username" - password: "!secret grdf.password" - pce_identifier: "!secret grdf.pce_identifier" - timezone: ${GRDF_TIMEZONE} # Timezone of the data. It should be the same as the Home Assistant timezone. - last_days: ${GRDF_LAST_DAYS} # Number of days of data to retrieve - reset: false # If true, the data will be reset before the first data retrieval. If false, the data will be kept and new data will be added. + - name: gazpar2haws # Name of the device in home assistant. It will be used as the entity_id: sensor.${name}. + username: "!secret grdf.username" + password: "!secret grdf.password" + pce_identifier: "!secret grdf.pce_identifier" + timezone: "${GRDF_TIMEZONE}" # Timezone of the data. It should be the same as the Home Assistant timezone. + last_days: ${GRDF_LAST_DAYS} # Number of days of data to retrieve + reset: false # If true, the data will be reset before the first data retrieval. If false, the data will be kept and new data will be added. homeassistant: host: "!secret homeassistant.host" port: "!secret homeassistant.port" - endpoint: ${HOMEASSISTANT_ENDPOINT} + endpoint: "${HOMEASSISTANT_ENDPOINT}" # The websocket endpoint to use. It should be /api/websocket by default. token: "!secret homeassistant.token" diff --git a/addons/gazpar2haws/rootfs/app/config/secrets.template.yaml b/addons/gazpar2haws/rootfs/app/config/secrets.template.yaml index c4f3926..d916d4d 100644 --- a/addons/gazpar2haws/rootfs/app/config/secrets.template.yaml +++ b/addons/gazpar2haws/rootfs/app/config/secrets.template.yaml @@ -1,7 +1,7 @@ -grdf.username: ${GRDF_USERNAME} -grdf.password: ${GRDF_PASSWORD} -grdf.pce_identifier: ${GRDF_PCE_IDENTIFIER} +grdf.username: "${GRDF_USERNAME}" +grdf.password: "${GRDF_PASSWORD}" +grdf.pce_identifier: "${GRDF_PCE_IDENTIFIER}" -homeassistant.host: ${HOMEASSISTANT_HOST} -homeassistant.port: ${HOMEASSISTANT_PORT} -homeassistant.token: ${HOMEASSISTANT_TOKEN} +homeassistant.host: "${HOMEASSISTANT_HOST}" +homeassistant.port: "${HOMEASSISTANT_PORT}" +homeassistant.token: "${HOMEASSISTANT_TOKEN}" diff --git a/config/secrets.template.yaml b/config/secrets.template.yaml index c4f3926..477159e 100644 --- a/config/secrets.template.yaml +++ b/config/secrets.template.yaml @@ -1,7 +1,7 @@ -grdf.username: ${GRDF_USERNAME} -grdf.password: ${GRDF_PASSWORD} -grdf.pce_identifier: ${GRDF_PCE_IDENTIFIER} - -homeassistant.host: ${HOMEASSISTANT_HOST} -homeassistant.port: ${HOMEASSISTANT_PORT} -homeassistant.token: ${HOMEASSISTANT_TOKEN} +grdf.username: "${GRDF_USERNAME}" +grdf.password: "${GRDF_PASSWORD}" +grdf.pce_identifier: "${GRDF_PCE_IDENTIFIER}" + +homeassistant.host: "${HOMEASSISTANT_HOST}" +homeassistant.port: "${HOMEASSISTANT_PORT}" +homeassistant.token: "${HOMEASSISTANT_TOKEN}" From 44b6065ddfb026c1e2c4334697d431b315e2fea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Senart?= <> Date: Wed, 15 Jan 2025 22:55:09 +0100 Subject: [PATCH 2/2] [#38] Using the HA addon, the PCE identifier is transformed into another number. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d25323d..319899d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +[#38](https://github.com/ssenart/gazpar2haws/issues/38): Using the HA addon, the PCE identifier is transformed into another number. + [#36](https://github.com/ssenart/gazpar2haws/issues/36): Error if HA endpoint configuration is missing in configuration.yaml. ### Added