Skip to content
Β 
Β 

Repository files navigation

HA Menstruation Cycle

HACS Custom License: MIT Version

HA Menstruation Cycle is a Home Assistant custom integration for tracking cycle history, showing cycle phases, and powering Lovelace dashboards with interactive menstrual-cycle cards.

It combines a Home Assistant integration, per-profile sensors, local data storage, and a frontend card set so households can keep the setup inside Home Assistant instead of spreading data across separate tools. The project supports multiple profiles, visual dashboards, product usage tracking, symptom logging, and export workflows.

Why use it?

  • HACS-ready Home Assistant integration with UI-based setup
  • Multiple profiles for shared households
  • Interactive cards for cycle entry, calendar views, history, heatmaps, timers, and statistics
  • Services for history management, symptom logging, exports, inventory workflows, and automations
  • Automatic frontend resource registration when installed through the integration
  • Local-first storage inside Home Assistant

Quick Start

  1. Open HACS and add the custom repository git: /wallenium/HA-menstrual-cycle.
  2. Install Menstruation Cycle, then add the integration under Settings β†’ Devices & Services.
  3. Create a profile with a friendly name, restart Home Assistant, and add custom:menstruation-gauge-card to a dashboard.
  4. Optional but recommended: import or recreate the daily refresh automation from /examples/daily_recalculate_days_until_next_start.yaml.

For manual installation, extra cards, service examples, and troubleshooting, use the wiki pages below.

Migration note

custom:menstruation-cycle-card has been removed. Update existing Lovelace YAML dashboards to use custom:menstruation-gauge-card instead.

Screenshot

HA Menstruation Cycle dashboard

πŸ“š Full documentation

Start here: Documentation Hub

Detailed guides:

Disclaimer summary

This project is a convenience and visualization tool. It is not a medical device and must not be used as a reliable standalone method for contraception, conception planning, diagnosis, or safety-critical decisions.

Before using it in a shared household or for sensitive automations:

  • treat predictions as approximations
  • use automations only with explicit agreement from the affected people
  • keep health, privacy, and backup considerations in mind

Read the full disclaimer in Disclaimer.

Onboarding stages and confidence gating

The integration now supports stage-aware onboarding and forecast confidence gating:

  • pre_menarche – educational mode before the first period. Deterministic period/ovulation predictions are suppressed.
  • early_menarche – learning phase after the first period when history is sparse/irregular. Forecasts are shown as broader possible windows with low confidence by default.
  • established_cycle – standard cycle forecasting. If data quality is still too low, read-only display logic can temporarily downgrade to learning-phase behavior.

How predictions differ by stage

  • Pre-menarche: no precise cycle-day claims; emphasis is on neutral tracking/supportive messaging.
  • Early menarche: low-data users get uncertainty-aware windows (for example β€œpossible period window”) and ovulation-day precision is withheld until data quality thresholds are met.
  • Established cycle: prior behavior is retained unless confidence gates detect insufficient quality (too few valid cycles, high variability, or too few recent logs).

Confidence/data-quality gates

High-precision outputs are only shown when all required checks pass:

  • minimum valid cycle count
  • acceptable cycle variability bounds
  • sufficient recent log activity

Otherwise the integration degrades to low-confidence window output and suppresses precise ovulation claims.

Switching stage later

You can change the onboarding stage at any time in Settings β†’ Devices & Services β†’ Menstruation Cycle β†’ Configure (onboarding_stage option).

Young Girls Support

The custom:menstruation-support-card provides age-appropriate, practical education and low-anxiety support for pre-/early-menarche users. It has no effect on forecast logic β€” it is a UI-only card.

Included content modules

Module Description
πŸ—“οΈ School-day helper reminders Configurable, discreet reminder presets: kit check, drink water, comfort check-in, rest cue
πŸ“– Glossary Plain-language definitions for cycle, ovulation, and spotting, with optional "learn more" expansion
πŸ”΅ Cycle phases graphic Abstract SVG donut chart of period / follicular / ovulation / luteal phases with legend and ARIA description
🧼 Hygiene how-to cards Step-by-step guides for washing period underwear and using a period cup (basics)
πŸ’› Reassurance cards Short "Is this normal?" cards covering irregular timing, flow variation, and spotting, each with a gentle escalation prompt

Visibility

  • Shown by default in pre_menarche and early_menarche modes.
  • Hidden by default in established_cycle mode; set the internal _showInEstablished flag or use a conditional card to display it when desired.

Reminder configuration

Reminders are rendered as a settings panel inside the card. Each preset can be toggled on/off and assigned a preferred time. School-day-only reminders are labelled accordingly. Quiet hours can be enabled to suppress reminders between configurable start and end times.

Note: The card renders reminder previews only. To send actual notifications, connect the reminder state to a Home Assistant automation using the notification service of your choice.

Educational content scope and disclaimers

All content is for educational purposes only and must not be used as medical advice. Each content module includes a visible disclaimer. Users are encouraged to follow the instructions provided with their hygiene products and to consult a clinician for medical questions.

Localization

All user-facing strings in the Young Girls Support card use i18n keys (ygs_*). Translations are provided for English (πŸ‡¬πŸ‡§), German (πŸ‡©πŸ‡ͺ), Swedish (πŸ‡ΈπŸ‡ͺ), French (πŸ‡«πŸ‡·), and Spanish (πŸ‡ͺπŸ‡Έ). To add or improve a translation, edit the corresponding file in custom_components/menstruation_cycle/www/translations/.

Accessibility

  • The cycle phases SVG includes role="img", aria-label, and a hidden <desc> element for screen readers.
  • Non-colour-only meaning: every phase has a text label in the legend alongside its colour dot.
  • Toggle controls use visible focus styles.
  • Reduced-motion: any future animations must respect prefers-reduced-motion; the current SVG graphic is static.

Cycle Dashboard (optional sidebar page)

The integration now includes an optional Cycle Dashboard sidebar page for a fast daily workflow.

Enable / disable

  1. Open Settings β†’ Devices & Services β†’ Menstruation Cycle β†’ Configure.
  2. Enable Show Cycle Dashboard in sidebar.
  3. (Optional) Set Prefer Cycle Dashboard as start page as a preference flag for setups that support default-page behavior.

If the sidebar toggle is disabled, existing cards and views continue to work unchanged.

Dashboard customization

  • Use Edit dashboard to:
    • show/hide cards
    • reorder cards (up/down)
    • toggle discreet mode
    • optionally set display name/pronouns for the My Info mini-card
  • Preferences are stored per user and profile.

Mode presets

  • Young mode (pre_menarche / early_menarche): simpler default layout with discreet mode enabled.
  • General mode (established_cycle): richer default layout with more insight cards.
  • Users can reset back to mode defaults at any time from Edit mode.

Privacy / discreet behavior

  • Discreet mode uses more neutral wording in overview content.
  • Sensitive cards can be hidden individually.
  • My Info card is optional and can stay hidden.

Translations

Language Status
πŸ‡¬πŸ‡§ English βœ… 100%
πŸ‡©πŸ‡ͺ German βœ… 100%
πŸ‡ΈπŸ‡ͺ Swedish βœ… 100%
πŸ‡«πŸ‡· French 🟑 96% – Seeking volunteers
πŸ‡ͺπŸ‡Έ Spanish 🟑 95% – Seeking volunteers

Template files for Swedish, French, and Spanish are already in place. See Translation Section for instructions on how to contribute a translation.

Contributing and feedback

Feedback, ideas, bug reports, edge cases, and pull requests are welcome. If you want to improve documentation, add cards, refine services, or help with testing, please open an issue or PR.

AI was used to help draft parts of the code and English wording, while the project idea and implementation direction remain human-authored.

About

Female health logging - log your Menstruation, pregnancy and period products in HomeAssistant

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages