Add filter change reminder notification feature - #2
Open
MiroStW wants to merge 5 commits into
Open
Conversation
added 5 commits
October 19, 2025 21:37
The duplicate 'variable plugin_name' inside the namespace was causing namespace resolution issues during plugin initialization. The plugin system uses the directory name to create the namespace, making this internal variable declaration redundant and problematic. This fixes the 'can't read ::plugins::de1_water_tracker_plugin::version' error that prevented the plugin from loading.
Replace namespace variable references with string literals for save_plugin_settings calls, matching the pattern used by other established plugins like advanced_rest_api. This makes the code more maintainable and consistent with DE1 plugin conventions.
Remove '_plugin' suffix from plugin name to follow naming conventions used by other established plugins (e.g., advanced_rest_api, mqtt). The directory should also be renamed from de1_water_tracker_plugin to de1_water_tracker when installing. This is a breaking change - users will need to: 1. Disable and remove the old de1_water_tracker_plugin 2. Install the renamed de1_water_tracker plugin
Implements the TODO item to notify users when a water usage threshold is reached. Features: - New setting for filter change reminder threshold (in L or gal) - Automatic notification popup when threshold is reached - Threshold respects current unit selection (L/gallons) - Notification flag resets when threshold is changed - UI input field with auto-conversion based on selected units - Done button saves threshold before closing settings The notification flag is reset when: - Counter is reset (allows notification for next cycle) - Threshold value is changed (allows notification at new threshold) Closes: TODO item 'Add a ping to let you know when a set total L/gal has been reached for filter change' Version bumped to 0.2 Tested and verified working: - UI properly spaced to avoid overlapping elements - Threshold saves correctly when Done button is clicked - Notification shows at correct threshold - Notification can be triggered again after changing threshold
- Add dedicated water_filter_warning page with dismiss button - Warning page displays once per filter cycle (until reset/threshold change) - More prominent and impossible to miss compared to popup - Follows DE1 conventions for message pages - Universal across all skins
Author
Update: Replaced Popup with Custom Warning PageBased on feedback from the DE1 maintainer, I've improved the notification mechanism: What Changed
Why This Is Better
Technical Implementation
This ensures users never miss the important reminder to change their water filter! ✨ |
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.
Summary
This PR adds a filter change reminder notification feature that alerts users when they reach a configurable water usage threshold.
New Features
Filter Change Reminder Notification
UI Improvements
Implementation Details
notification_shownflag tracks whether notification was displayedTesting
✅ Tested on DE1 production environment
✅ UI properly spaced and readable
✅ Threshold saves correctly when Done button is clicked
✅ Notification displays at correct threshold
✅ Notification can be triggered again after changing threshold
✅ Unit conversion works correctly between L and gallons
Closes
Version bumped from 0.1 to 0.2