question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wear OS app gets put to sleep

See original GitHub issue

Home Assistant Android version: 2022.3.0-full (phone) 2022.3.0 (watch)

Android version: 10 (phone) Wear OS 2.34

Phone model: Samsung Galaxy S9+ TicWatch Pro 2020

Home Assistant version: 2022.4.7

Last working Home Assistant release (if known): n/a

Description of problem: Watch sensors (especially battery levels) stop being sent overnight while watch is not on wrist. This means that battery level info is not sent, so HA automations to switch on/off a USB charging outlet do not work. This behaviour is not consistent, leading me to believe that the Wear OS app is not setting the appropriate wake-locks or requesting the correct power modes in order to ensure data is sent.

Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs): n/a


Screenshot of problem:

Additional information: There is a developer-mode option “stay awake while charging” which I have enabled, that provides some relief for the issue. However the HA companion app still appears to be put to sleep by Wear OS in some situations.

Edit: I should add that this is not always an “overnight” issue - sometimes the battery level info is not updated during the day while the watch is being worn. Opening the HA app on the watch then causes the sensor data to be updated immediately. This is expected if Wear OS is putting the app to sleep while it is not “active” however the app needs to remain in-memory in order to send updated sensor data to HA periodically.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jeremysherriffcommented, Oct 10, 2022

Sorry, missed a part of the question; yes the settings persist across restarts.

1reaction
jeremysherriffcommented, Oct 10, 2022

Yeah it’s been working really well. I think battery life is affected a little, I have difficulty quantifying the impact though - so maybe something like 2-5% extra drain across the course of a 17-hour day (7am - 10pm).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to put wear os app on Never Sleeping Apps? It is ... - Reddit
At the top of the screen, tap "Not Optimized" and then tap "All apps." You should now see a list of all the...
Read more >
Which WearOS apps sync to Sleep Tracking on Google Fit
Which WearOS apps sync to Sleep Tracking on Google Fit ? Google Fit now has sleep tracking, which appears to pull data from...
Read more >
How to track sleep with Wear OS - Android Central
Here is where you can set up how you would like the app to begin tracking, wake you up, and other options based...
Read more >
Android Wear OS integration - Sleep Cycle
Sleep Cycle now supports Android Wear OS, this is how it works. Is the Watch stand alone? No, not really. You don't need...
Read more >
Ability to Stop sleep tracking from Wear OS companion app
If sleep tracking is active in Sleep as Android on the phone, opening the Sleep Tracking companion app causes it to stop (not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found