add to hacs

๐ŸŒ™ saas - Sleep As Android status

๐Ÿšจ 0.2.0 breaking changes ๐Ÿšจ

due to changes in **Home Assistant** 2025.12, you **must** remove your existing **SAAS** integration entries and re-add them after updating to this version. ---

๐Ÿ“– description:

sleep as android status is my solution for wake/sleep state within HA. it listens for the Sleep As Android MQTT messages, so it does require being on the same network. as of 0.0.4, buttons that link with the companion app have been added.

๐Ÿ’ก this integration works best with a **Xiaomi Mi Band** (7 or older) mixed with the notify app and Sleep As Android configured.

๐Ÿงฑ this integration will create:

โœ… known working

๐Ÿงช installation:

โš™๏ธ configuration:

๐Ÿ“ฒ set up Notify for Mi Band 7
  1. pair **Mi Band 7** as you normally would with Mi Fitness
  2. obtain auth key for Notify app using ADB
adb shell
grep -E "authKey=[a-z0-9]*," /sdcard/Android/data/com.xiaomi.wearable/files/log/XiaomiFit.device.log |
awk -F ", " '{print $17}' | grep authKey | tail -1 | awk -F "=" '{print $2}'
  

credit: iamfosscad

  1. uninstall **Mi Fitness**
  2. download/install Notify for Mi Band
  3. follow prompts, input auth key, select Mi Fitness is not installed
  4. enable Sleep As Android in Notify settings
๐Ÿ” extracting the Zepp authKey on a rooted android device
su
cd /data/data/com.huami.watch.hmwatchmanager/databases/
ls origin_db_*
sqlite3 origin_db_1234567890 "SELECT AUTHKEY FROM DEVICE;"
  

๐Ÿ›Œ sleep as android setup

  1. open the app and follow setup
  2. settings wheel > services > automation > MQTT
(tcp/ssl)://(MQTT User):(MQTT Pass)@(HA URL):(port)
  1. enable automatic tracking
  2. sensor: sonar or accelerometer
  3. wearables > **Xiaomi Mi Band** > test sensor
๐Ÿ“ฆ changes 0.2.0 0.1.0 0.0.6a
๐Ÿšจ known issues

๐Ÿ’ฌ no known issues at this time.