Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store health services updates and send them with worker updates #3076

Merged
merged 2 commits into from
Nov 17, 2022

Conversation

dshokouhi
Copy link
Member

Summary

This is a different approach compared to #3069 where instead of pushing data point updates every 15 minutes, we just send them along with our worker updates.

I ran a test for 24 hours and while the worker did not stop during the day, it seemed to have stopped shortly after enabling bedtime mode. What actually happens is that Android starts to throttle our jobs for an undetermined length of time, updates from intents are still coming through. The jobs end up getting canceled as soon as they are created. Placing the app in the whitelist does prevent this behavior and in my testing is decent on battery life.

Its going to be difficult to find a happy medium here and this behavior will vary from user to user.

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

@jpelgrom
Copy link
Member

If the update type is set to CUSTOM it should be documented in my opinion, even if the Wear app doesn't display it (yet). In this case maybe WORKER would also be fine as it is still sends the most recent value?

@dshokouhi
Copy link
Member Author

If the update type is set to CUSTOM it should be documented in my opinion, even if the Wear app doesn't display it (yet). In this case maybe WORKER would also be fine as it is still sends the most recent value?

I think worker may make the most sense here since we send updates with the current schedule. I'll update the types to be more correct.

Copy link
Member

@jpelgrom jpelgrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this provides a good balance between battery life and timely updates

@JBassett JBassett merged commit a390865 into home-assistant:master Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants