Sleep tracking / Galaxy Watch Active 2

I configured Sleep as Android and my Galaxy Watch Active 2 to track my sleep and trigger an input boolean in Home Assistant when I’m sleeping via Tasker. Didn’t realize I had to manually tell the watch I’m sleeping, so I have to remember to do this for automations to work correctly. The watch does automatically track and report to the Samsung Health app when I’m sleeping (+/- about 20 minutes), but doesn’t seem like there’s a way to take this info into Tasker to trigger automations. Has anyone found a good workaround for this?

Hi mhendu, I’m looking for the same solution.
Did you have any success?

Not exactly. I used Sleep as Android for a while, and set up a Tasker automation to trigger a binary switch in Home Assistant to let it know I was sleeping by pressing a button on the watch. This worked OK for a while, but I think a software update to my phone made it less reliable, so I switched to an app that lets you trigger Tasker tasks directly from your watch. This means I have to press a button to tell Home Assistant I’m sleeping, and press again when I wake up, but it works OK, if a bit manual (I also set an automation to set my switch to ‘awake’ after 10 hours in case I forgot to trigger it). My wife’s watch does detect when she’s sleeping and can trigger tasks from it - it’s a different brand with an Android OS I believe - but the issue there is that there are false positives and will sometimes fail to trigger, and it won’t instantly detect that she’s sleeping. Kind of depends on your use case. For me, I’m trying to get the cat’s automatic litterbox to not run while I’m sleeping since it’s in the next room over and can disturb my sleep, so it’s overall better in that case I think to have a manual trigger, or maybe to set up a pressure sensor in the bed for sleep detection.

sleep as android has its own auto sleep detection feature…you also dont need to use tasker as a crutch anymore…sleep as android has MQTT and webhook support so you can send the events directly to HA.