#Send sensor updates on location received
1 messages · Page 1 of 1 (latest)
Wouldn't that potentially create a loop when the include in sensor update option is on for single accurate location?
Also very battery intensive when using high accuracy mode
Would be interesting if it was possible to update only the geocode sensor 🤔
ah yes it would, unless we keep it in the method. Althought my idea was to only send the sensor update if we send the location update
hmm that could work but the only way I see it really working is as a one off since we update all sensors at once
I dont know if we really need include in sensor updates for single accurate anymore, its an odd sensor
although we could just add a flag and just not update sensors when updating location from that sensor?
What I meant to say is that the location update itself is odd because we request 5 updates but htat can be triggered anytime any sensor is updated so that can get out of hand and cause other issues unexpectedly...i normally direct users to turning off that feature if they ahve location update issues
There are more sensors that might benefit from only update a single sensor, soon we will have several flags like that
the issue then becomes the poll based sensors update less frequently
those sensors are more upto date when other sensors are updated frequently
at least for this sensor it feels like a special case
I'm not suggesting it should be used for all intent based sensors, but right now updating requires all sensors to be updated which might get out of hand
And for example the upcoming BLE scanner can also do very frequent updates
yea that one is gonna send updates like crazy
So a more general solution for situations like these seems like a good idea to me
Instead of asking the user to choose between slower updates or a lot more battery usage
in this case my thought was that we already sent a location update so we shoudl send a sensor update
but single acuratte will cause a loop in sendLocationUpdate
Or only do this if single accurate on sensor update is off? It is in the same SensorManager so not impossible to check
we already perform the check in requestSensorUpdates in LocationSensorManager so not hard to keep track of it
so high accuracy mode in itself is already battery intensive do you think we should only do this on normal background updates then?
almost feels like it shoudlnt be that much of an impact as we are already awake sending updates every 5 seconds
I wonder if the app will be able to update all sensors in <5s on all devices
If only battery sensors are enabled it should be fine, but what if a lot more is on and it's a slower device?
In this case it might make sense to update only this sensor with device tracker updates, if it's enabled of course.
I do see a lot of users comparing the data of this sensor to the device tracker, usually points to misconfigured sensors
Updating with link to PR, in case anyone is reading this in the future: https://github.com/home-assistant/android/pull/2757
so now that this PR has been merged, I am wondering if the updateType for the sensor should be updated to intent or left as is because it only updates that fast if location tracking is enabled 🤔
also minor bug fix for the above PR https://github.com/home-assistant/android/pull/2772