Repository navigation
feat(alerts): warn about a low 12V battery once per parking - #765
Merged
Merged
Conversation
A parked car with a weak 12V battery was warned about on every new poll that still showed it low, so a car left in the cold for a few days sent the same warning again and again. It is now warned about once per parking. It is warned again in the same parking only when the voltage has dropped another 0.3 V below the one it was last warned about (rounded to the tenth the alert shows), so a battery that keeps draining is still news. - INotificationRepository.GetLastSentAtAsync: when the newest notification of a category went out since a moment. - ITelemetryRepository.GetBatteryVoltageAtAsync: the 12V voltage as last reported at a moment, in TelemetryRepository and the demo one. - README and CONFIGURATION describe the new rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joszz
force-pushed
the
feat/low-12v-once-per-parking
branch
from
November 25, 2026 21:39
bfcfd99 to
1e17a62
Compare
joszz
enabled auto-merge
November 25, 2026 21:39
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.
A parked car with a weak 12V battery was warned about on every new poll that still showed it low. A car left in the cold for a few days sent the same "Low 12V battery" warning again and again.
What changes
LastParkedAt(or the first poll of the stretch when the car was never seen parking).Low12VRewarnDropVolt) below the voltage it was last warned about, rounded to the tenth the alert shows. A battery that stays low is news once. One that keeps draining is news again.INotificationRepository.GetLastSentAtAsync: when the newest notification of a category for a car went out after a given moment, deleted ones included.ITelemetryRepository.GetBatteryVoltageAtAsync: the 12V voltage as last reported at or before a moment. It's inTelemetryRepositoryandDemoTelemetryRepository. The demo one answers the current voltage, since demo mode runs no Worker.documentation/CONFIGURATION.md(AUX_BATTERY_LOW_VOLT) describe the new rule.Tests
PushNotificationCheckServiceTests: one warning per parking, a new warning after a further 0.3 V drop, none for a smaller drop, and a new parking warns again.NotificationRepositoryTestsandTelemetryRepositoryTestscover the two new queries.dotnet test --project src/GarageStack.Tests: 2083 passed, 37 skipped (the Postgres-only tests).dotnet format --verify-no-changesis clean.🤖 Generated with Claude Code