If you’re using Sleep as Android and want local, reliable, and real-time sleep tracking inside Home Assistant, this will get you there—no cloud junk, no polling delays.
What’s New in the Overhaul:
Rewritten to persist configuration properly in UI
All optional sensors now actually work
State is now a proper dropdown (awake, light, deep, asleep)
Better attribute structure for automations and Lovelace display
Much more robust MQTT parsing
Features:
MQTT-based integration (Sleep as Android supports this natively)
Tracks sleep state, duration, noise, and more
Plays nice with automation triggers (lights off, scenes, etc.)
Purely local – no internet required
Install via HACS:
Add this repo as a custom integration: https://github.com/sudoxnym/saas
I use this to automate wind-down routines, cut lights/sounds on sleep start, and queue up morning automations when waking. If you’re into automating your sleep hygiene or just want to track sleep without a subscription, give it a shot. Feedback/bug reports welcome!
The next alarm sensor doesn’t seem to be working for me. It’s showing “unknown”. But I know the integration is working as it can detect changes in tracking status.
The integration only updates alarms if it is on the same network at the same time the alarm is set. It requires the MQTT message to get through. It does not detect what you already have set. I will do some testing on mine to see if I can recreate the issue. To be honest, the next alarm feature is counterintuitive to the design of the integration and will probably be getting removed in the future.
Thank you for this! I was using MQTT in SleepAsAndroid to manage a morning alarm and saw the “official” SleepAsAndroid integration but I hate that it uses unauthenticated* webhooks. Since I already had my MQTT server set up with SSL encryption and user+password authentication for external network access using the webhook felt backwards.
This integration is excellent as it simply allowed me to use all the infrastructure I had already setup but gave me a ton of awesome SleepAsAndroid magic that I didn’t want to code myself! I love it!
*You can pretend that having a random string of characters in the URL is like having an authentication token … but let’s be real here, it’s not.