{"id":30226632,"url":"https://github.com/grantnedwards/eight-sleep","last_synced_at":"2026-06-15T20:31:35.391Z","repository":{"id":306721314,"uuid":"1027018545","full_name":"grantnedwards/eight-sleep","owner":"grantnedwards","description":"   Comprehensive Home Assistant integration for Eight Sleep smart mattresses with custom Lovelace card, device actions, and real-time sleep monitoring","archived":false,"fork":false,"pushed_at":"2025-07-27T08:15:47.000Z","size":1690,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-24T13:46:32.100Z","etag":null,"topics":["custom-card","eight-sleep","home-assistant","homeassistant","integration","lovelace","sleep-monitoring","smart-bed","temperature-control"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grantnedwards.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-27T06:10:33.000Z","updated_at":"2025-08-20T15:30:06.000Z","dependencies_parsed_at":"2025-07-27T08:27:23.085Z","dependency_job_id":"228d7fcc-746a-49a4-a24c-43be702d45b1","html_url":"https://github.com/grantnedwards/eight-sleep","commit_stats":null,"previous_names":["grantnedwards/eight-sleep"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/grantnedwards/eight-sleep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantnedwards%2Feight-sleep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantnedwards%2Feight-sleep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantnedwards%2Feight-sleep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantnedwards%2Feight-sleep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grantnedwards","download_url":"https://codeload.github.com/grantnedwards/eight-sleep/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantnedwards%2Feight-sleep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34379915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-card","eight-sleep","home-assistant","homeassistant","integration","lovelace","sleep-monitoring","smart-bed","temperature-control"],"created_at":"2025-08-14T17:01:48.962Z","updated_at":"2026-06-15T20:31:35.385Z","avatar_url":"https://github.com/grantnedwards.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eight Sleep Integration for Home Assistant\n\nA comprehensive Home Assistant integration for Eight Sleep smart mattresses and mattress covers, featuring a beautiful custom Lovelace card, device actions, enhanced error handling, and real-time sleep stage tracking.\n\n[![hacs_badge](https://img.shields.io/badge/HACS-Custom-orange.svg)](https://github.com/custom-components/hacs)\n[![maintainer](https://img.shields.io/badge/maintainer-%40grantnedwards-blue.svg)](https://github.com/grantnedwards)\n[![license](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\n## 📋 Description\n\nThis integration provides comprehensive control and monitoring for Eight Sleep smart mattresses and mattress covers. It includes real-time temperature control, sleep stage tracking, biometric monitoring, and a beautiful custom Lovelace card for easy bed management.\n\n**Key Features:**\n- 🎛️ Real-time temperature control with custom Lovelace card\n- 📊 Comprehensive sleep stage and biometric monitoring  \n- 🔧 Device actions for automation integration\n- 🛡️ Enhanced error handling with offline support\n- 📱 Responsive design for mobile and desktop\n\n## ✨ Features\n\n### 🎛️ Custom Lovelace Card\n- **Real-time Temperature Control**: Adjust bed temperature with intuitive sliders\n- **Visual Bed Presence Indicators**: See when someone is on each side of the bed\n- **Sleep Metrics Display**: View heart rate, HRV, breath rate, and sleep quality\n- **Responsive Design**: Works perfectly on mobile and desktop devices\n- **Theme Support**: Automatically adapts to light/dark themes\n- **Side-by-Side Controls**: Independent control for left and right sides\n\n### 🔧 Device Actions\n- **Temperature Control**: Set temperature, increment/decrement, and preset modes\n- **Side Control**: Turn individual sides on/off\n- **Away Mode**: Start/stop away mode with one-touch actions\n- **Pod Management**: Prime pod and configure bed sides\n- **Modern Integration**: Uses Home Assistant's device action framework\n\n### 🛡️ Enhanced Error Handling\n- **Exponential Backoff**: Intelligent retry logic with exponential delays\n- **Connection Recovery**: Automatic token refresh and connection recovery\n- **Graceful Degradation**: Continues working when API is temporarily unavailable\n- **Detailed Logging**: Comprehensive error reporting and debugging information\n\n### 📊 Enhanced Sensors\n- **Real-time Sleep Stage Tracking**: Monitor sleep stages with detailed attributes\n- **Sleep Stage Breakdown**: Detailed breakdown of sleep stage percentages\n- **Biometric Monitoring**: Heart rate, HRV, and respiratory rate tracking\n- **Environmental Sensors**: Room temperature and bed temperature monitoring\n- **Device Health**: Water level, priming status, and device health monitoring\n\n## 🚀 Installation\n\n### Via HACS (Recommended)\n\n1. Add this repository to HACS\n2. Install the integration\n3. Add your Eight Sleep credentials in Home Assistant\n4. Add the custom card to your Lovelace dashboard\n\n### Manual Installation\n\n1. Copy the `custom_components/eight_sleep` folder to your Home Assistant `custom_components` directory\n2. Restart Home Assistant\n3. Add your Eight Sleep credentials in the integrations page\n\n## 📋 Configuration\n\n### Basic Integration Setup\n\n1. Go to **Settings** → **Devices \u0026 Services**\n2. Click **Add Integration**\n3. Search for **Eight Sleep**\n4. Enter your Eight Sleep credentials\n5. The integration will automatically discover your devices\n\n### Custom Card Configuration\n\nAdd this to your Lovelace dashboard:\n\n```yaml\ntype: custom:eight-sleep-bed-card\ntitle: \"Eight Sleep Bed\"\nleft_side: \"left\"\nright_side: \"right\"\n```\n\n### Advanced Card Configuration\n\n```yaml\ntype: custom:eight-sleep-bed-card\ntitle: \"Master Bedroom\"\nleft_side: \"left\"\nright_side: \"right\"\nshow_metrics: true\nshow_presence: true\ntemperature_range:\n  min: 16\n  max: 32\n  step: 0.5\n```\n\n## 🎯 Device Actions\n\nThe integration provides device actions that can be used in automations:\n\n### Temperature Actions\n- **Set Temperature**: Set specific temperature for bed sides\n- **Increment Temperature**: Adjust temperature by increment\n- **Set Preset**: Apply Cool/Warm/Neutral presets\n\n### Control Actions\n- **Turn On Side**: Activate heating/cooling for specific side\n- **Turn Off Side**: Deactivate heating/cooling for specific side\n- **Start Away Mode**: Enable away mode\n- **Stop Away Mode**: Disable away mode\n\n### Device Actions\n- **Prime Pod**: Prime the Eight Sleep pod\n- **Set Bed Side**: Configure bed side settings\n\n## 📊 Sensors\n\n### Sleep Stage Sensors\n- **Sleep Stage**: Real-time sleep stage tracking with duration and history\n- **Sleep Stage Breakdown**: Detailed breakdown of sleep stage percentages\n- **Sleep Efficiency**: Calculated sleep efficiency percentage\n\n### Biometric Sensors\n- **Heart Rate**: Real-time heart rate monitoring\n- **HRV**: Heart rate variability tracking\n- **Breath Rate**: Respiratory rate monitoring\n- **Sleep Quality**: Sleep quality score\n\n### Environmental Sensors\n- **Room Temperature**: Current room temperature\n- **Bed Temperature**: Current bed temperature\n- **Target Temperature**: Target heating temperature\n\n### Device Sensors\n- **Water Level**: Pod water level status\n- **Priming Status**: Pod priming status\n- **Device Health**: Overall device health status\n\n## 🔧 Services\n\nThe integration provides several services for advanced control:\n\n### Temperature Services\n- `eight_sleep.heat_set`: Set heating level with duration\n- `eight_sleep.heat_increment`: Increment heating level\n\n### Control Services\n- `eight_sleep.side_on`: Turn on bed side\n- `eight_sleep.side_off`: Turn off bed side\n- `eight_sleep.away_mode_start`: Start away mode\n- `eight_sleep.away_mode_stop`: Stop away mode\n\n### Alarm Services\n- `eight_sleep.alarm_snooze`: Snooze alarm\n- `eight_sleep.alarm_stop`: Stop alarm\n- `eight_sleep.alarm_dismiss`: Dismiss alarm\n\n### Device Services\n- `eight_sleep.prime_pod`: Prime the pod\n- `eight_sleep.set_bed_side`: Configure bed side settings\n\n## 🤖 Automation Examples\n\n### Automatic Temperature Adjustment\n\n```yaml\nautomation:\n  - alias: \"Cool Bed at Bedtime\"\n    trigger:\n      platform: time\n      at: \"22:00:00\"\n    action:\n      - service: climate.set_temperature\n        target:\n          entity_id: climate.eight_sleep_left_side\n        data:\n          temperature: 18\n```\n\n### Sleep Stage Monitoring\n\n```yaml\nautomation:\n  - alias: \"Notify Deep Sleep\"\n    trigger:\n      platform: state\n      entity_id: sensor.eight_sleep_sleep_stage_enhanced\n      to: \"Deep Sleep\"\n    action:\n      - service: notify.mobile_app\n        data:\n          message: \"Deep sleep detected - optimal rest phase\"\n```\n\n### Away Mode Automation\n\n```yaml\nautomation:\n  - alias: \"Start Away Mode When Gone\"\n    trigger:\n      platform: state\n      entity_id: person.your_name\n      to: \"not_home\"\n    action:\n      - service: eight_sleep.away_mode_start\n        target:\n          entity_id: sensor.eight_sleep_sensor\n```\n\n## 🎨 Custom Card Features\n\n### Temperature Control\n- **Real-time Slider**: Adjust temperature from 16°C to 32°C\n- **Preset Buttons**: Quick access to Cool, Warm, and Neutral settings\n- **Side-specific Control**: Independent temperature control for each side\n- **Visual Feedback**: Active sides are highlighted\n\n### Sleep Metrics\n- **Heart Rate**: Real-time heart rate monitoring\n- **HRV**: Heart rate variability tracking\n- **Breath Rate**: Respiratory rate monitoring\n- **Sleep Quality**: Sleep quality score percentage\n\n### Presence Detection\n- **Visual Indicators**: Green dots show when someone is present\n- **Side-specific**: Separate indicators for left and right sides\n- **Real-time Updates**: Updates automatically when presence changes\n\n### Responsive Design\n- **Mobile Optimized**: Touch-friendly controls for mobile devices\n- **Desktop Enhanced**: Full feature set for desktop use\n- **Theme Support**: Automatically adapts to light/dark themes\n\n## 🔍 Troubleshooting\n\n### Integration Issues\n1. **Authentication Failed**: Verify your Eight Sleep credentials\n2. **No Devices Found**: Ensure your Eight Sleep device is online\n3. **Connection Errors**: Check your internet connection and Eight Sleep service status\n\n### Card Issues\n1. **Card Not Loading**: Ensure Eight Sleep integration is properly configured\n2. **Temperature Controls Not Working**: Check that climate entities are available\n3. **Metrics Not Displaying**: Verify sensor entities are available and sleep session is active\n\n### Sensor Issues\n1. **No Sleep Data**: Ensure you're actively using the bed for sleep tracking\n2. **Missing Sensors**: Check that all sensor entities are properly created\n3. **Stale Data**: Verify the integration is updating regularly\n\n## 📈 Performance\n\n### Optimizations\n- **Smart Polling**: Updates based on device state and activity\n- **Connection Pooling**: Efficient API connection management\n- **Caching**: Intelligent data caching to reduce API calls\n- **Background Updates**: Non-critical data updates in background\n\n### Error Recovery\n- **Exponential Backoff**: Intelligent retry logic prevents API overload\n- **Token Refresh**: Automatic token refresh when expired\n- **Graceful Degradation**: Continues working during temporary API issues\n- **Connection Monitoring**: Real-time connection status tracking\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.\n\n### Development Setup\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Eight Sleep for providing the API\n- Home Assistant community for inspiration and feedback\n- Contributors who have helped improve this integration\n\n## 📞 Support\n\n- **GitHub Issues**: [Report bugs or request features](https://github.com/lukas-clarke/eight_sleep/issues)\n- **Discussions**: [Join the community discussion](https://github.com/lukas-clarke/eight_sleep/discussions)\n- **Documentation**: [Full documentation](https://github.com/lukas-clarke/eight_sleep/wiki)\n\n---\n\n**Made with ❤️ for the Home Assistant community**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantnedwards%2Feight-sleep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrantnedwards%2Feight-sleep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantnedwards%2Feight-sleep/lists"}