A privacy-focused Home Assistant integration for tracking menstrual cycles with adaptive prediction algorithms.
Your data stays on YOUR device - No cloud, no external servers, complete privacy.
- ๐ Multi-Language & Formats - Full English and German UI support with customizable date formats
- ๐ Adaptive Predictions - Uses rolling averages of your last 3 cycles (not generic 28-day predictions)
- ๐ 100% Privacy - All data stored locally in Home Assistant
- ๐ฑ Easy Logging - Simple services to track periods and a variety of symptoms (including temperature sensitivity and custom text)
- ๐ฏ Phase Tracking - Menstrual, Follicular, Ovulation, Luteal phases
- ๐ Full Automation - Integrate with lights, climate, notifications
- โก Real-time Updates - Entities update instantly when you log data
- ๐ Binary Sensor - Period Active status for automations
| Cycles | Accuracy | Status |
|---|---|---|
| 0 | N/A | Can start logging |
| 1 | ยฑ5 days | Basic tracking |
| 2 | ยฑ3 days | Simple predictions |
| 3 | ยฑ1-2 days | Recommended โญ |
| 6+ | <1 day | Optimal |
Bottom line: Start with what you have! Works with 0 cycles, excellent with 3, optimal with 6+.
-
Add this repository to HACS:
- Open HACS in Home Assistant
- Click on "Integrations"
- Click the three dots in the top right
- Select "Custom repositories"
- Add this repository URL
- Select "Integration" as the category
- Click "Add"
-
Install the integration:
- Search for "Menstrual Cycle Tracker"
- Click "Download"
- Restart Home Assistant
-
Add the integration:
- Go to Settings โ Devices & Services
- Click "+ Add Integration"
- Search for "Menstrual Cycle Tracker"
- Follow the setup wizard
- Copy the
custom_components/menstrual_cycle_trackerfolder to your Home Assistant'scustom_componentsdirectory - Restart Home Assistant
- Go to Settings โ Devices & Services โ Add Integration โ "Menstrual Cycle Tracker"
A separate blueprint repository is available for notification automations:
Repository: sjfehlen/cycle-tracker-blueprints
Quick import:
- Settings โ Blueprints โ Import Blueprint
- URL:
https://github.com/sjfehlen/cycle-tracker-blueprints/blob/main/blueprints/automation/menstrual_cycle_notifications.yaml
Or add to HACS โ Automation โ Custom Repositories โ https://github.com/sjfehlen/cycle-tracker-blueprints โ Blueprint
- Tracker Name: Give it a friendly name (e.g., "My Cycle" or "Cycle Tracker")
- Date Format: Choose your preferred date format (e.g.,
%Y-%m-%d,%d.%m.%Y,%m/%d/%y) for backend data and automation service calls.
For best results, enter your last 3 cycles during setup:
Cycle 1 (Most Recent):
Start: 2026-02-02
End: 2026-02-06
Cycle 2:
Start: 2026-01-05
End: 2026-01-10
Cycle 3:
Start: 2025-12-09
End: 2025-12-14
Why 3 cycles?
- Medical standard (3 months tracking)
- Rolling average algorithm kicks in
- ยฑ1-2 day accuracy from day one
- You can skip this and add data later!
Date format: YYYY-MM-DD
The integration creates a device with these entities:
binary_sensor.cycle_tracker_period_active- State: On/Off (is period happening now?)
- Perfect for automations
-
sensor.cycle_tracker_current_phase- States: Menstrual, Follicular, Ovulation, Luteal
-
sensor.cycle_tracker_cycle_day- Value: Current day in cycle (1, 2, 3...)
-
sensor.cycle_tracker_next_period- Value: Predicted next period date
- Attribute: days_until_next_period
-
sensor.cycle_tracker_period_length- Value: Average period length in days
-
sensor.cycle_tracker_cycle_length- Value: Average cycle length in days
-
sensor.cycle_tracker_fertile_window- States: Yes/No
- Attribute: is_pms_window
-
sensor.cycle_tracker_todays_symptoms- Value: Number of symptoms logged today
- Attribute: symptoms (list of today's symptom details)
calendar.cycle_tracker_cycle_tracker- Shows past periods, current active period, and all future predicted periods
- Visible on the HA Calendar dashboard
๐ก Smart Tracker Selection: If you only have one tracker installed, you can skip the
trackerfield in all service calls. Home Assistant will select it automatically! ๐ Easy Date Picking: When using the Home Assistant UI, dates can be comfortably selected using the built-in Calendar Popup instead of manual typing.
service: menstrual_cycle.log_period_start
data:
date: "2026-02-02" # Optional, defaults to todayservice: menstrual_cycle.log_period_end
data:
date: "2026-02-06" # Optional, defaults to todayservice: menstrual_cycle.log_symptom
data:
symptom: "cramps" # Options: cramps, headache, fatigue, bloating, mood_swings, temperature_sensitivity - or any custom text!
severity: "moderate" # Severity options: mild, moderate, severe. Temperature options: very_cold, slightly_cold, normal, slightly_warm, very_hot
date: "2026-02-02" # Optional, defaults to todayservice: menstrual_cycle_tracker.edit_cycle
data:
original_start_date: "01/05/26" # Identifies which cycle to edit
new_start_date: "01/06/26" # Optional, new start date
new_end_date: "01/10/26" # Optional, new end dateservice: menstrual_cycle_tracker.delete_cycle
data:
start_date: "01/05/26" # Identifies the cycle to removeservice: menstrual_cycle_tracker.delete_symptom
data:
date: "02/02/26" # Date the symptom was logged
symptom: "cramps" # Exact symptom name to remove# configuration.yaml
input_button:
period_started:
name: Period Started
icon: mdi:calendar-heart
period_ended:
name: Period Ended
icon: mdi:check-circle
# automations.yaml
automation:
- alias: "Log Period Start"
trigger:
- platform: state
entity_id: input_button.period_started
action:
- service: menstrual_cycle.log_period_start
- service: notify.mobile_app
data:
message: "Period logged! ๐ช"
- alias: "Log Period End"
trigger:
- platform: state
entity_id: input_button.period_ended
action:
- service: menstrual_cycle.log_period_endautomation:
- alias: "Period Alert"
trigger:
- platform: time
at: "09:00:00"
condition:
- condition: template
value_template: >
{{ state_attr('sensor.cycle_tracker_current_phase', 'days_until_next_period') == 2 }}
action:
- service: notify.mobile_app
data:
title: "๐ฉธ Period Alert"
message: "Your period is predicted to start in 2 days"automation:
- alias: "Comfort Lighting"
trigger:
- platform: state
entity_id: binary_sensor.cycle_tracker_period_active
to: "on"
condition:
- condition: sun
after: sunset
action:
- service: light.turn_on
target:
entity_id: light.bedroom
data:
brightness_pct: 30
kelvin: 2700automation:
- alias: "Fertile Window"
trigger:
- platform: state
entity_id: sensor.cycle_tracker_fertile_window
to: "Yes"
action:
- service: notify.mobile_app
data:
title: "๐ฅ Fertility Update"
message: "You've entered your fertile window!"A companion Lovelace card is available that visualizes your cycle data with color-coded phases, a segmented progress bar, fertile/PMS indicators, symptom chips, and cycle statistics.
Repository: sjfehlen/flow-meter-card
Install via HACS:
- HACS โ Frontend โ Custom Repositories
- Add
https://github.com/sjfehlen/flow-meter-cardas Lovelace category - Install "Menstrual Cycle Tracker Card"
- Reload your browser
The card uses a visual editor โ just select your Period Active binary sensor and customize which sections to show.
If you prefer a simple entities card:
type: entities
title: ๐ธ Cycle Tracker
entities:
- entity: binary_sensor.cycle_tracker_period_active
name: Period Active
- entity: sensor.cycle_tracker_current_phase
name: Current Phase
- entity: sensor.cycle_tracker_cycle_day
name: Cycle Day
- entity: sensor.cycle_tracker_next_period
name: Next Period
- entity: sensor.cycle_tracker_fertile_window
name: Fertile WindowInstead of using a generic 28-day cycle:
-
Looks at your last 3 cycles
Example: 27, 28, 26 days -
Calculates average
(27 + 28 + 26) / 3 = 27 days -
Predicts next period
Last period: Feb 2 Add 27 days = Mar 1 -
Adapts continuously
- Each new cycle updates the average
- Outliers automatically filtered
- Gets more accurate over time
- Menstrual (Days 1-6): Period active
- Follicular (Days 7-13): Between period end and ovulation
- Ovulation (Days 13-16): Fertile window
- Luteal (Days 16-27): After ovulation until next period
Your data NEVER leaves your device:
- โ Stored locally in Home Assistant
- โ No cloud services
- โ No external servers
- โ No analytics or tracking
- โ You own and control everything
Data location:
/config/.storage/menstrual_cycle.cycles.[entry_id]
Data format:
{
"cycles": [
{"start_date": "2026-02-02", "end_date": "2026-02-06"}
],
"symptoms": [
{"date": "2026-02-02", "symptom": "cramps", "severity": "moderate"}
]
}Q: Can I track multiple people?
A: Yes! Add the integration multiple times with different names.
Q: What if I don't remember my last 3 cycles?
A: Skip the initial data step and start logging from today. Predictions will improve after 2-3 cycles.
Q: How accurate are predictions?
A: With 3+ cycles: typically ยฑ1-2 days. Gets better with more data.
Q: Does this work for irregular cycles?
A: Yes, but predictions will be less accurate. The algorithm adapts to your pattern.
Q: Can I edit old data?
A: Yes! Use the edit_cycle, delete_cycle, and delete_symptom services. Identify cycles by their start date.
Q: Is this HIPAA compliant?
A: All data stays on your device, so there's no data transmission. However, consult a compliance expert for your specific use case.
- Log at least one period start date
- Check date format is YYYY-MM-DD
- Check logs: Settings โ System โ Logs
- Ensure all files are in
custom_components/menstrual_cycle_tracker/ - Restart Home Assistant completely
- Check for errors in logs
- This should update instantly in v2
- Try reloading the integration
- Check dispatcher is working (no errors in logs)
- Edit historical cycles via service
- Statistics card with charts
- Symptom correlation tracking
- Calendar entity with predicted periods
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - See LICENSE file
- Built for the Home Assistant community
- Algorithm based on medical cycle tracking standards
- Inspired by the need for privacy-focused period tracking
- Issues: GitHub Issues
- Home Assistant Community: Forum Thread
Made with โค๏ธ for privacy-conscious cycle tracking
Track your cycle. Own your data. Automate your comfort.