styled readme

This commit is contained in:
sudoxnym 2025-12-08 14:01:59 -07:00
parent 7ca0571d76
commit b61f04e3e8

View file

@ -1,21 +1,35 @@
<div align="center">
<img src="brands/icon.png" width="128" height="128" alt="sleepd icon">
# sleepd
> real-time sleep state tracking for home assistant via mqtt
**real-time sleep state tracking for home assistant**
[![HACS Custom](https://img.shields.io/badge/HACS-Custom-41BDF5?style=flat-square&logo=homeassistant)](https://hacs.xyz/docs/faq/custom_repositories)
[![License](https://img.shields.io/badge/license-MIT-green?style=flat-square)](LICENSE)
[![HACS Custom](https://img.shields.io/badge/HACS-Custom-00ffff?style=for-the-badge&logo=homeassistant)](https://hacs.xyz/docs/faq/custom_repositories)
[![License](https://img.shields.io/badge/license-MIT-ff00ff?style=for-the-badge)](LICENSE)
*processes sleep mqtt messages from android apps and exposes states, events, and controls to home assistant - automate your smart home based on whether you're awake or asleep.*
---
## what it does
</div>
sleepd processes sleep-related mqtt messages from android apps that track sleep in real time. it exposes sleep states, events, and controls to home assistant - letting you automate your smart home based on whether you're awake or asleep.
## ✨ features
- **wake status sensor**`awake` or `asleep` based on configurable thresholds
- **sleep stage tracking** — light, deep, rem, awake
- **alarm controls** — dismiss, snooze, skip via HA buttons
- **sound detection** — snore, talk, cough events
- **lullaby control** — playback status and stop button
- **disturbance alerts** — apnea and anti-snoring events
## 📱 compatible apps
**compatible apps:**
- [sleep as android](https://sleep.urbandroid.org/) (primary)
- any app that publishes sleep events via mqtt in a compatible format
- any app that publishes sleep events via mqtt
## sensors
## 📊 sensors
| sensor | description |
|--------|-------------|
@ -28,7 +42,7 @@ sleepd processes sleep-related mqtt messages from android apps that track sleep
| lullaby | lullaby playback status |
| state | raw event from last mqtt message |
## buttons
## 🎮 buttons
*requires home assistant companion app*
@ -37,7 +51,9 @@ sleepd processes sleep-related mqtt messages from android apps that track sleep
- sleep tracking start / stop / pause / resume
- sleep tracking start with smart alarm
## installation
## 📥 installation
### option 1: hacs (recommended)
1. add this repo to HACS custom repositories:
```
@ -48,11 +64,15 @@ sleepd processes sleep-related mqtt messages from android apps that track sleep
3. restart home assistant
4. add integration via UI or click below:
4. add integration via UI:
[![Add Integration](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=saas)
## configuration
### option 2: manual
copy `custom_components/saas` to your HA `custom_components` directory
## ⚙️ configuration
| option | description |
|--------|-------------|
@ -64,7 +84,7 @@ sleepd processes sleep-related mqtt messages from android apps that track sleep
| sleep states | which states indicate being asleep |
| mobile app | companion app target for buttons (optional) |
## mqtt message format
## 📡 mqtt setup
sleepd expects json messages with an `event` field:
@ -77,9 +97,9 @@ sleepd expects json messages with an `event` field:
{"event": "rem"}
```
## sleep as android setup
### sleep as android config
1. open sleep as android > settings > services > automation > MQTT
1. open sleep as android → settings → services → automation → MQTT
2. connection string:
```
@ -90,9 +110,8 @@ sleepd expects json messages with an `event` field:
4. enable automatic tracking
## compatible wearables
## ⌚ tested wearables
tested with sleep as android:
- xiaomi mi band 7 (via notify for mi band)
- garmin fenix 7x (via garmin alternative)
- amazfit gtr3 pro
@ -108,10 +127,16 @@ awk -F ", " '{print $17}' | grep authKey | tail -1 | awk -F "=" '{print $2}'
</details>
## changelog
## 📜 license
**1.0.0** - rebranded, removed next alarm sensor, generic mqtt focus
MIT — do whatever you want with it
---
<div align="center">
made by [sudoxnym](https://sudoxreboot.com) ⚡
*formerly known as saas*
</div>