Multi-user wellness tracking for Home Assistant.
- Body metrics — per-participant body weight (kg) and waist (cm) number entities, mirrored to
state_class: measurementsensors so Home Assistant records long-term statistics (trend charts). - JSONL ledgers — a "Save body metrics" button (or the
wellness.save_body_metricsservice) appends tobody-metrics-<user>.jsonlon your NAS mount, deduplicated against the last row. - Meal photos — an authenticated
POST /api/wellness/photoendpoint + a camera card. The participant is resolved from the logged-in HA account, so each person just opens their own app and taps. Photos land infood-photos/<user>/YYYY/MM/DD/…with ameal-log-<user>.jsonlentry. - Smart-scale assignment — connect your shared weight sensor(s) in the options. Readings are auto-assigned to a participant when unambiguous (last weight within ±5 kg and ≤ 60 days old); otherwise a pending reading is created, the
wellness_pending_weightevent fires (for admin notification), andsensor.wellness_pending+ the assign card let you resolve it explicitly. Deduplicated against repeated pushes. Sensor values are normalized to kg (g / lb / oz / st supported). - Reminders — per-participant schedule (weekday + time + every-N-days, default Sunday 20:00 weekly); the integration fires
wellness_measurement_reminderfor you to notify via your own automation. - VLM meal analysis (Groq) — new meal photos are analyzed automatically (no manual step): after a photo is uploaded, the integration runs Groq vision (
qwen/qwen3.6-27b) on it and stores structured analysis (food,beverages, amounts,estimated_kcal_total+ per item) inmeal-analysis-<user>.jsonl. A per-user Meal analysis status sensor (analyzing/done/error, withkcal/food/photoattributes) powers the capture card's "Analyzing… → result" feedback, and the Today kcal / Last meal sensors update. You can also runwellness.analyze_mealsmanually. - Meal log & delete — the meal log card lists recent meals (photo, time, detected food, kcal) from the authenticated
GET /api/wellness/mealsendpoint and lets you delete wrong entries (POST /api/wellness/meal/deleteor thewellness.delete_mealservice), removing the photo, meal-log and meal-analysis rows. - Daily kcal target & progress — each participant has a daily kcal target (set in Configure → edit participant). The Kcal remaining sensor shows what's left today (with
target_kcal/consumed_kcal/percent_consumedattributes) so you always know where you stand. - Eating regularity — the Meals today sensor tracks how often you've eaten (count, today's meal times, min/avg/last gap in minutes) and flags
too_frequentwhen consecutive meals are closer than 2 hours (snacking). - Multi-user — every participant is a Home Assistant account; each gets their own device, entities and ledgers.
- HACS → ⋮ → Custom repositories → add
https://github.com/jaggr2/ha-wellness, category Integration. - Install Wellness → restart Home Assistant.
- Settings → Devices & services → Add integration → Wellness.
Copy the www/ folders to <config>/www/, then register as Lovelace resources:
/local/wellness-capture-card/wellness-capture-card.js/local/wellness-assign-card/wellness-assign-card.js/local/wellness-meal-log-card/wellness-meal-log-card.js
git clone https://github.com/jaggr2/ha-wellness.git
cp -r ha-wellness/custom_components/wellness <config>/custom_components/During setup you provide:
- Wellness data folder — pick one of your configured NAS mounts (or type a path). Default
wellness → /share/wellness. - Participants — the Home Assistant users taking part (one account per person).
In Configure you can: add/remove participants, edit a participant's name + measurement schedule, select shared weight sensors (the smart scale(s)) that feed auto-assignment, and set the Groq API key + vision model for meal analysis.
- Get a free key at https://console.groq.com/keys (Groq offers a free tier).
- In Configure → paste the key (model default
qwen/qwen3.6-27b). - Meal photos are analyzed automatically after upload. The capture card shows "Analyzing…" then the kcal/food result; the
Meal analysis statussensor andToday kcal/Last mealsensors update too. Or runwellness.analyze_meals {user: roger}(or an automation on thewellness_meal_loggedevent) to (re)process unanalyzed photos.
<mount>/wellness/
├── body-metrics-<user>.jsonl {"ts","weight_kg","waist_cm","source","assigned_by","sensor_id"}
├── meal-log-<user>.jsonl {"ts","photo","source"}
├── meal-analysis-<user>.jsonl {"ts","photo","food","beverages","estimated_kcal_total","…"}
└── food-photos/<user>/YYYY/MM/DD/*.jpg
Events (fire on the bus, for your automations):
wellness_measurement_reminder—{user, name, interval_days}(per-participant schedule)wellness_pending_weight—{reading_id, weight_kg, sensor_id, candidates}(ambiguous scale reading)wellness_weight_assigned—{user, weight_kg, assigned_by}
Services:
wellness.save_body_metrics—{user: <slug>}wellness.assign_weight—{reading_id, user: <slug>}wellness.dismiss_weight—{reading_id}wellness.analyze_meals—{user: <slug>, limit?: <n>}(Groq vision)
Example automations (reminder + pending-scale notification) and a dashboard are in example-automations/ and example-dashboard.yaml.
pip install -r requirements-dev.txt
pytestApache-2.0. Not affiliated with Home Assistant.