No description
Find a file
2024-05-29 16:08:52 -06:00
brands Add files via upload 2024-05-27 01:11:11 -06:00
custom_components/saas Updating to 0.0.6 2024-05-29 16:00:57 -06:00
.gitignore Create .gitignore 2024-05-05 20:48:10 -06:00
hacs.json Update hacs.json 2024-05-09 19:32:19 -06:00
LICENSE Create LICENSE 2024-05-05 20:55:31 -06:00
README.md Update README.md 2024-05-29 16:08:52 -06:00

Add to HACS

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, 1 service, and 1 device per user:


Sensors

Message Received *State
Wake Status
Sound
Disturbance
Alarm
Lullaby
Sleep Tracking
Sleep Statge

This should intelligently and dynamically allow for state changes in the Wake Status Sensor.

Buttons

Alarm Dismiss
Alarm Snooze
Lullaby Stop
Sleep Tracking Pause
Sleep Tracking Resum
Sleep Tracking Start
Sleep Tracking Start with Optimal Alarm
Sleep Tracking Stop

Service

Set alarm service
service: saas.saas_example_alarm_set
data:
  message: Example Message!
  day: monday
  hour: 7
  minute: 30

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 To My 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.

Changes:

0.0.6a
Initial Beta Release Added persistant states through HA restart Added attributes for the Alarm Event sensor

Known issues:

Error in logs:
Logger: homeassistant.helpers.service
Source: /usr/src/homeassistant/homeassistant/helpers/service.py:708
First occurred: 3:55:19 PM (1 occurrences)
Last logged: 3:55:19 PM

Failed to load integration: saas NoneType: None

No known effects. Just an error message, everything works as expected.