This repository was archived by the owner on Jan 22, 2026. It is now read-only.
Draft
Fix GPS sensor update throttling for device tracking#35
Conversation
- Remove significance threshold (0.00001) for GPS sensors - GPS sensors now update on every value change for proper location tracking - Add debug logging for GPS data reception and updates - Update tests to verify GPS sensors update even with identical values Co-authored-by: JOHLC <[email protected]>
Copilot
AI
changed the title
[WIP] Fix GPS data slow sensor refresh issue
Fix GPS sensor update throttling for device tracking
Nov 18, 2025
Owner
|
@copilot, did you see the other comment? It seems to be flopping back to prev. values as well. Immediately after updating. |
- Changed GPS sensor comparison from _last_reported_value to _attr_native_value - This matches the flip-flop prevention used for non-GPS sensors - Prevents GPS values from reverting to previous values immediately after updating Co-authored-by: JOHLC <[email protected]>
Contributor
Author
Fixed in commit e66a5c4. GPS sensors were experiencing flip-flopping due to comparing against |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fix GPS Data Slow Sensor Refresh ✅
Issue: GPS data (latitude and longitude) not updating as frequently as other sensors. Sometimes only one update in a 20min drive. Breaks functionality as a device tracker.
Root Cause: GPS sensors had a significance threshold (0.00001 degrees) that could prevent updates when values changed by very small amounts or when the vehicle was stationary. Additionally, GPS sensors were experiencing flip-flopping where values would revert to previous values immediately after updating.
Changes Made:
_attr_native_valueinstead of_last_reported_valueHow It Works:
_attr_native_value) to prevent flip-floppingTechnical Details:
async_on_update()method to remove significance threshold check for GPS sensors!=) against_attr_native_valueinstead of_last_reported_valueTesting:
Security:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.