Skip to content

Commit

Permalink
[#47] 'reset' configuration parameter is ignored in the addon configu…
Browse files Browse the repository at this point in the history
…ration panel.
  • Loading branch information
Stéphane Senart committed Jan 16, 2025
1 parent 3b7e4dd commit 0450f9f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-dockerhub/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ runs:
with:
images: ${{ inputs.image }}
tags: |
# Set latest tag for the default branch
type=raw,value=latest,enable=${{ inputs.is_latest }}
# Set the version tag for all branches
type=raw,value=${{ inputs.version }}
# Set latest tag for the default branch
type=raw,value=latest,enable=${{ inputs.is_latest }}
- name: Log in to Docker Hub
uses: docker/#-action@v3
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.13] - 2025-01-16

### Fixed

[#47](https://github.com/ssenart/gazpar2haws/issues/47): 'reset' configuration parameter is ignored in the addon configuration panel.

## [0.1.12] - 2025-01-15

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ grdf:
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.
reset: ${GRDF_RESET} # 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"
Expand Down
5 changes: 4 additions & 1 deletion addons/gazpar2haws/rootfs/app/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ GRDF_PCE_IDENTIFIER=$(bashio::config 'grdf.pce_identifier')
GRDF_SCAN_INTERVAL=$(bashio::config 'grdf.scan_interval')
GRDF_LAST_DAYS=$(bashio::config 'grdf.last_days')
GRDF_TIMEZONE=$(bashio::config 'grdf.timezone')
GRDF_RESET=$(bashio::config 'grdf.reset')

HOMEASSISTANT_HOST=supervisor
HOMEASSISTANT_PORT=80
Expand All @@ -18,6 +19,7 @@ HOMEASSISTANT_TOKEN=${SUPERVISOR_TOKEN}
: "${GRDF_SCAN_INTERVAL:="480"}" # 8 hours
: "${GRDF_LAST_DAYS:="365"}" # 1 year
: "${GRDF_TIMEZONE:="Europe/Paris"}" # Default timezone: Europe/Paris
: "${GRDF_RESET:="false"}" # Default reset: false

: "${HOMEASSISTANT_HOST:?HOMEASSISTANT_HOST is required and not set.}"
: "${HOMEASSISTANT_PORT:="8123"}" # Default Home Assistant port
Expand All @@ -35,9 +37,10 @@ echo "HOMEASSISTANT_HOST: ${HOMEASSISTANT_HOST}"
echo "HOMEASSISTANT_PORT: ${HOMEASSISTANT_PORT}"
echo "HOMEASSISTANT_ENDPOINT: ${HOMEASSISTANT_ENDPOINT}"
echo "HOMEASSISTANT_TOKEN: ${HOMEASSISTANT_TOKEN}"
echo "GRDF_RESET: ${GRDF_RESET}"

# Export environment variables
export GRDF_USERNAME GRDF_PASSWORD GRDF_PCE_IDENTIFIER GRDF_SCAN_INTERVAL GRDF_LAST_DAYS GRDF_TIMEZONE HOMEASSISTANT_HOST HOMEASSISTANT_PORT HOMEASSISTANT_ENDPOINT HOMEASSISTANT_TOKEN
export GRDF_USERNAME GRDF_PASSWORD GRDF_PCE_IDENTIFIER GRDF_SCAN_INTERVAL GRDF_LAST_DAYS GRDF_TIMEZONE GRDF_RESET HOMEASSISTANT_HOST HOMEASSISTANT_PORT HOMEASSISTANT_ENDPOINT HOMEASSISTANT_TOKEN

# Instantiate the template config
if [ ! -e /app/config/configuration.yaml ]; then
Expand Down

0 comments on commit 0450f9f

Please # to comment.