Draft
Add per-task total_increasing completion counter sensor#69
total_increasing completion counter sensor#69Conversation
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add sensor to track number of times completed for tasks
Add per-task Aug 9, 2026
total_increasing completion counter sensor
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
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.
This adds a new sensor per task that tracks how many times the task has been completed, enabling trend/statistics use-cases. The counter increments only on actual “mark as done” actions (button/service), and does not change when setting
last_donedirectly.Completion counter model
times_completedtoTaskTrackerCoordinator.async_mark_as_done(...)after a successful state transition path.async_set_last_done_date(...)remains non-incrementing.New sensor entity
TaskTrackerTimesCompletedSensorfor each task device.state_class: total_increasing.sensor.task_tracker_<task_name>_times_completed<entry_id>_times_completedCoverage updates
state_classtask_tracker.mark_as_donetask_tracker.set_last_done_date