Fix #3: Preserve gas_daily_kwh sensor on reboot or no new data#46
Draft
mdeweerd wants to merge 3 commits into
Draft
Fix #3: Preserve gas_daily_kwh sensor on reboot or no new data#46mdeweerd wants to merge 3 commits into
mdeweerd wants to merge 3 commits into
Conversation
When there is no new GRDF data or on reboot, the gas_daily_kwh sensor was disappearing. Now it preserves the last known value by reading it from Home Assistant and updating the sensor. This ensures the sensor remains available even when no new data is received.
53950fd to
e0a3d01
Compare
The changes address issue #3 by preserving the gas_daily_kwh sensor value when the application reboots or when no new data is available. This is achieved by retrieving the last known value from Home Assistant and updating the sensor to maintain its state. The changes include formatting improvements and added logging for better debugging. Fixes #3
Updated the base image versions from 18.1.1 to 20.1.1 for aarch64, amd64, and armv7 architectures. Also updated the add-on version from v2025.9.3 to v2026.5.3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
The gas_daily_kwh sensor was disappearing when there was no new GRDF data or on reboot.
Fix
Added code to preserve the last known value by:
Testing