-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added reauth flow, much better error handling on setup
### Feature * Now supports reauthentication if credentials have expired/no longer work * Better error handling when configuring integration, will notify user of incorrect credentials ### Fix * Removed Owlet specific constants, now using homeassistant generic constants * On initialisation the integration would crash when trying to update the auth token, the integration would then have to be deleted and setup again
- Loading branch information
1 parent
bb0e8cc
commit ad699b4
Showing
15 changed files
with
243 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Changelog | ||
|
||
<!--next-version-placeholder--> | ||
|
||
## v1.5.0 (2023-05-12) | ||
### Feature | ||
* Now supports reauthentication if credentials have expired/no longer work | ||
* Better error handling when configuring integration, will notify user of incorrect credentials | ||
|
||
### Fix | ||
* Removed Owlet specific constants, now using homeassistant generic constants | ||
* On initialisation the integration would crash when trying to update the auth token, the integration would then have to be deleted and setup again |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Owlet Custom Integration | ||
|
||
[![GitHub Release][releases-shield]][releases] | ||
![GitHub all releases][download-all] | ||
![GitHub release (latest by RyanClark123)][download-latest] | ||
[![GitHub Activity][commits-shield]][commits] | ||
|
||
[![License][license-shield]][license] | ||
|
||
[![hacs][hacsbadge]][hacs] | ||
[![Project Maintenance][maintenance-shield]][user_profile] | ||
|
||
A custom component for the Owlet smart sock, currently this only supports the owlet smart sock 3. | ||
|
||
If you have a smart sock 2 and would like to contribute then please do so. | ||
|
||
## Installation | ||
|
||
1. Use [HACS](https://hacs.xyz/docs/setup/download), in `HACS > Integrations > Explore & Add Repositories` search for "Owlet". After adding this `https://github.com/RyanClark123/owlet` as a custom repository. | ||
2. Restart Home Assistant. | ||
3. [![Add Integration][add-integration-badge]][add-integration] or in the HA UI go to "Settings" -> "Devices & Services" then click "+" and search for "Owlet Smart Sock". | ||
|
||
|
||
<!----> | ||
|
||
## Usage | ||
|
||
The `Owlet` integration offers integration with the Owlet Smart Sock cloud service. This provides sensors such as heart rate, oxygen saturation, charge percentage. | ||
|
||
This integration provides the following entities: | ||
|
||
- Binary sensors - charging status, high heart rate alert, low heart rate alert, high oxygen alert, low oxygen alert, low battery alert, lost power alert, sock diconnected alert, and sock status. | ||
- Sensors - battery level, oxygen saturation, oxygen saturation 10 minute average, heart rate, battery time remaining, signal strength, and skin temperature. | ||
|
||
## Options | ||
|
||
- Seconds between polling - Number of seconds between each call for data from the owlet cloud service, default is 10 seconds. | ||
|
||
--- | ||
|
||
[commits-shield]: https://img.shields.io/github/commit-activity/w/RyanClark123/owlet?style=for-the-badge | ||
[commits]: https://github.com/RyanClark123/owlet/commits/main | ||
[hacs]: https://github.com/hacs/integration | ||
[hacsbadge]: https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge | ||
[license]: LICENSE | ||
[license-shield]: https://img.shields.io/github/license/RyanClark123/owlet.svg?style=for-the-badge | ||
[maintenance-shield]: https://img.shields.io/badge/maintainer-Ryan%20Clark%20%40RyanClark123-blue.svg?style=for-the-badge | ||
[releases-shield]: https://img.shields.io/github/release/RyanClark123/owlet.svg?style=for-the-badge | ||
[releases]: https://github.com/RyanClark123/owlet/releases | ||
[user_profile]: https://github.com/RyanClark123 | ||
[download-all]: https://img.shields.io/github/downloads/RyanClark123/Owlet/total?style=for-the-badge | ||
[download-latest]: https://img.shields.io/github/downloads/RyanClark123/Owlet/latest/total?style=for-the-badge | ||
[add-integration]: https://my.home-assistant.io/redirect/config_flow_start?domain=owlet | ||
[add-integration-badge]: https://my.home-assistant.io/badges/config_flow_start.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Custom Integrations for Home Assistant.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.