Sleep As Android Status Integration

I am happy to announce that I have released a highly functioning integration for Sleep As Android. Now you can tell your Home Assistant when you are Awake or Asleep and it’s fairly accurate. Want the alarm to set if you and your spouse are asleep? Multi profile support! Want to set an alarm on your phone with an automation and not have to learn API Intents? I gotchu. Many other features as well! Updated documentation and detailed walk-through! I even linked things for sale I don’t get paid for.

Well, I think I am ready to unveil my integration. I have created SAAS - Sleep As Android Status, to bridge the gap between SAA and HA. I’m hoping some people will try it out and let me know what they think. I wrote this in about 2 weeks with no prior knowledge of python, the best I knew was the yaml we use in HA. I was waiting on my logo to be accepted but I’m not sure what I need to do to get it approved, so, I’m putting it out there now.

1 Like

It takes a bit for the logo’s to be accepted. I remember it took me a few weeks at least for my custom integration. To be fair, those people also need to check a lot of PR’s for core, so I can understand them being busy :stuck_out_tongue:

I’ll see when I can get around to trying this btw! It’ll save me from writing the actions myself at least. Only shame is I just found out they removed the intent/action to change alarm times it seems :frowning:

1 Like

The intent to disable an alarm is still there. Use it in combination with the intent (or the simplified service from SAAS) to set a new alarm. One of my next changes is adding the disable feature.

Sorry but I still try to understand what’s the use of this and how it works ? you speak about Miband 7 also but not sure why :confused:

Sleep As Android is an Android Sleep Monitoring/Clock app. Mibands have the notify app(the 8 doesnt work well), which can be set up to tell SAA to start monitoring when you fall asleep. This can be done without the Miband, but the miband gives increased accuracy. You configure the MQTT in SAA and use the same topic in SAAS to receive the state updates, such as sleep tracking started. The mobile app choice when setting up will allow for you to use the buttons in HA to control the sleep tracking as well as an easy way to set alarms.

Just wanted to pop in and update, v0.1.0 has been released with many features and many fixes. The integration works better than expected now.

Mind updating the guide with how you connect notify to home assistant? from what i see you need both the pro and addon license for notify to do that.

These two require the pro licence
11. Turn on Fell Asleep and set to Sleep as Android - Start sleep tracking
12. Turn on Awoke and set to Sleep as Android - Stop sleep tracking

And the HA connection needs the addons 2023 license, unless it works without? Your github manual doesn’t mention if they do.

I clearly don’t understand how MQTT works and could use a little help.

Home Assistant:
I have Mosquito Broker installed and connected to MQTT. I have MQTT setup. I installed the Sleep as Android Integration from the HACS store. All Sleep as Android Integration settings left as default.

Sleep as Android:
I have Sleep as Android installed. I have a pro licenses. I have turned on MQTT in Sleep as Android. I have inputed the URL and edited the topic to include my device name. I have hit test in Sleep as Android and it says “connecting…” then “Success”

Why do I not see the connection in Home Assistant?

After 8 is optional on that one. Turning on Sleep as Android is all you need from notify, then in sleep as android you set the mqtt trigger. You don’t need to connect notify to ha, but you need it for Sleep.
Also, I switched to iPhone after making this. Kinda sucks that I don’t have this feature any more.
@ha.usable281
Sounds to me like you are either using the wrong integration or you’re expecting something to happen that never will. If you’re expecting something in HA when you connect sleep as android, nothing will. But if you need to test if it is working, set an alarm, or start and stop sleep tracking. My wife still uses it every night and its fairly accurate.

Sorry, because it’s not the right place. But I see that your integration try to comunicate to home assistant each event during night hearing trough MQTT… whatever Miband/Notify tells. I am trying to reach a different perspective about the topic; I do not need or want to use Home assistant as a “second” mobile phone that is monitoring me, I only want to give to home assistant the maximum “log” of the night that SAA can report, so I can graph it and store it to home assistant. I want to leave the hard work of monitoring and determine what zone I am in my sleep cycle to the app Sleep As Android. I think sync or upload a… ¿txt file? and interpreting it.

¿Do you know if your integration or someone else do this?

thanks

The MQTT is handled by SAA, so the sensors are info directly from SAA