Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sleep as android sensors for users that have the app #1124

Merged
merged 1 commit into from Oct 31, 2020

Conversation

dshokouhi
Copy link
Member

Fixes: #483

Integrates with the Intent API from sleep as android: https://docs.sleep.urbandroid.org/devs/intent_api.html#events-emitted-by-sleep

If the app is not installed then the sensors will not show up and the user won't be able to enable them. The intents that we register to are only for sleep as android so they do not cause any harm if the app is not installed or if the user decides not to enable them. We will also only process these events from sleep as android as they are received, all other updates are ignored.

I picked Sleep tracking and Lullaby to be binary sensors as I can reliably turn them on and off. All other events are one time based and are better suited for a sensor of its own.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate with Sleep as Android
3 participants