2.6 KiB
SAAS - Sleep As Android Status
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 Xioami MiBand (7 or older) mixed with the Notify app and Sleep As Android configured.
This integration will create 8 Sensors, 8 Buttons and 1 device per user:
Sensors
Message Received *StateWake Status
Sound
Disturbance
Alarm
Lullaby
Sleep Tracking
Sleep Statge
Buttons
Alarm DismissAlarm Snooze
Lullaby Stop
Sleep Tracking Pause
Sleep Tracking Resum
Sleep Tracking Start
Sleep Tracking Start with Optimal Alarm
Sleep Tracking Stop
This should intelligently and dynamically allow for state changes in the Wake Status Sensor.
Installation:
Add https://www.github.com/sudoxnym/saas to your Custom Repositories in HACS
Search and Download SAAS - Sleep As Android Status
Restart Home Assistant
Add Integration: SAAS - Sleep As Android Status
Configuration:
Name: Name of user
Topic: MQTT Topic from Sleep As Android
QoS: Quality of Service
Awake Duration: This is for tuning. Time in seconds in which awake states = true to indicate awake. Sensor usually updates within 30 seconds or so after the duration, not entirely sure why the delay.
Asleep Duration: This is for tuning. Time in seconds in which sleep states = true to indicate asleep Sensor usually updates within 30 seconds or so after the duration, not entirely sure why the delay.
Awake States: States to indicate being awake
Asleep States: States to indicate being asleep
Mobile App: Target for buttons
Please report any issues.
This is my first integration.
Built this in less than a week, with no prior knowledge of Python.