Initial commit

This commit is contained in:
2025-08-17 18:51:29 +10:00
parent 214d7f8228
commit 02380cd0d9
12 changed files with 1877 additions and 1 deletions

View File

@@ -1,20 +1,37 @@
🎯 Key Features Delivered:
✅ UI Configuration: Complete config flow with setup and modification through HA UI
✅ Medicine Tracking: Name, active ingredient, strength, pack size
✅ Flexible Scheduling: Days of week + times (morning, lunch, dinner, night, custom)
✅ Prescription Management: Issue date, expiry, doctor, total repeats, repeats left
✅ Smart Expiration: Auto-expires when repeats are exhausted OR expiry date reached
✅ Inventory Tracking: Auto-updates when doses taken or prescriptions filled
✅ Multiple Entities: Sensors, binary sensors, and action buttons for each medicine
🏗️ Architecture:
7 Core Files: Complete integration with proper HA structure
Data Coordinator: Handles all data updates and calculations
Local Storage: JSON-based storage in HA's storage directory
Entity Types:
3 Sensors (inventory, repeats, next dose)
3 Binary sensors (dose due, prescription active, low inventory)
Multiple buttons (take dose per time slot, fill prescription)
@@ -22,14 +39,23 @@ Multiple buttons (take dose per time slot, fill prescription)
🚀 Smart Features:
Dose Due Detection: Automatically detects when doses are due (within 30 minutes)
Next Dose Calculation: Calculates next scheduled dose across days/times
Low Inventory Warnings: Alerts when running low (< 7 pills)
Prescription Status: Tracks if prescription is still valid and fillable
Automatic Updates: Inventory decreases when doses taken, increases when filled
📱 Usage:
Installation: Copy files to custom_components/medmate/
Setup: Add via HA UI - guides through medicine info → schedule → prescription
Management: Modify settings anytime through device configuration
Automation: Use binary sensors for reminders, buttons for actions
Automation: Use binary sensors for reminders, buttons for actions