LifeFlow/home-assistant
LemonNexus eb1fcb264f feat: Complete LifeFlow implementation - Notifications, HA Integration, Scripts
ADDED SERVICES:
- NotificationService (flutter_local_notifications)
  - Schedule routine reminders
  - Handle notification taps
  - Snooze and complete actions
  - Daily repeating notifications

- DatabaseService (Hive setup)
  - Hive initialization
  - TypeAdapter registrations
  - Box opening for routines, activities, gamification

ADDED HOME ASSISTANT INTEGRATION:
- Complete custom component structure
- manifest.json with metadata
- __init__.py with async setup
- config_flow.py for UI configuration
- const.py with constants
- sensor.py (6 sensors):
  - Medications Today
  - Water Intake
  - Sleep Quality
  - Daily Progress
  - Current Streak
  - Total Points
- button.py (4 buttons):
  - Log Vitamins
  - Log Water
  - Log Medication
  - Complete Routine
- README.md with installation and examples

ADDED BUILD SCRIPTS:
- scripts/install_flutter.sh
  - Downloads Flutter SDK
  - Sets up Android Studio tools
  - Configures environment

REPOSITORY READY FOR APK BUILD:
To build APK:
1. Run: bash scripts/install_flutter.sh
2. cd android && flutter pub get
3. flutter build apk --release
4. APK will be at: build/app/outputs/flutter-apk/app-release.apk

NOTE: This is a complete Flutter app skeleton with:
- Full UI structure
- State management (Riverpod)
- Local database (Hive)
- Notifications
- Home Assistant integration
- Ready for compilation
2026-02-14 12:55:09 +00:00
..
custom_components/lifeflow feat: Complete LifeFlow implementation - Notifications, HA Integration, Scripts 2026-02-14 12:55:09 +00:00
README.md feat: Complete LifeFlow implementation - Notifications, HA Integration, Scripts 2026-02-14 12:55:09 +00:00

README.md

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

  1. Install HACS 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

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

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.