LifeFlow/home-assistant/README.md

96 lines
2.6 KiB
Markdown

# LifeFlow Home Assistant Integration
Custom component for integrating LifeFlow with Home Assistant.
## Features
- **Sensors:** Track your daily routines, water intake, sleep quality, and more
- **Buttons:** Log activities directly from Home Assistant
- **Automations:** Create powerful automations based on your routines
## Installation
### HACS (Recommended)
1. Install [HACS](https://hacs.xyz/) if you haven't already
2. Add this repository as a custom repository in HACS
3. Install "LifeFlow" integration
4. Restart Home Assistant
### Manual Installation
1. Copy the `custom_components/lifeflow` folder to your Home Assistant `config/custom_components/` directory
2. Restart Home Assistant
3. Go to Settings > Devices & Services > Add Integration
4. Search for "LifeFlow"
## Available Entities
### Sensors
| Entity | Description | Unit |
|--------|-------------|------|
| `sensor.lifeflow_medications_today` | Medications taken today | count |
| `sensor.lifeflow_water_intake` | Water consumed today | mL |
| `sensor.lifeflow_sleep_quality` | Last night's sleep quality | % |
| `sensor.lifeflow_daily_progress` | Daily routine completion | % |
| `sensor.lifeflow_current_streak` | Current streak | days |
| `sensor.lifeflow_total_points` | Total gamification points | points |
### Buttons
| Entity | Description |
|--------|-------------|
| `button.lifeflow_log_vitamins` | Log vitamin intake |
| `button.lifeflow_log_water` | Log water intake |
| `button.lifeflow_log_medication` | Log medication |
| `button.lifeflow_complete_routine` | Mark routine complete |
## Example Automations
### Turn on lights when you complete morning routine
```yaml
automation:
- alias: "Morning Routine Complete"
trigger:
- platform: state
entity_id: sensor.lifeflow_daily_progress
above: 50
condition:
- condition: time
after: "06:00:00"
before: "09:00:00"
action:
- service: light.turn_on
target:
entity_id: light.bedroom
```
### Remind you to drink water
```yaml
automation:
- alias: "Water Reminder"
trigger:
- platform: time_pattern
hours: "*"
minutes: "/30"
condition:
- condition: numeric_state
entity_id: sensor.lifeflow_water_intake
below: 2000
action:
- service: notify.mobile_app_your_phone
data:
message: "Don't forget to drink water!"
```
## Configuration
The integration is configured through the UI. Go to Settings > Devices & Services > LifeFlow.
## Support
For issues and feature requests, please use the [GitHub Issues](https://github.com/ImpulsiveFPS/LifeFlow/issues).