new and improved version under:
description is updated. the steps are explained, please check out and give feedback.
Monorepo for a Home Assistant menstruation tracker:
ha-menstruation-gauge(backend integration)lovelace-menstruation-gauge-card(interactive Lovelace card)
Repository target: https://github.com/nremey/HA_menstrual_gauge
- Stores cycle-start history persistently (local HA storage).
- Publishes
sensor.menstruation_gauge. - Provides forecast-related attributes (e.g.
days_until_next_start, predicted start, fertile window). - Exposes services:
menstruation_gauge.add_cycle_startmenstruation_gauge.remove_cycle_startmenstruation_gauge.set_historymenstruation_gauge.set_period_duration
- Circular monthly gauge view.
- Forecast marker (+/-1 day).
- Fertile-window ring segment.
- Click-to-edit mini calendar (add/remove cycle start days).
- Uses the integration sensor and services.
The integration automatically installs and registers the Lovelace card when you install the integration - no separate installation or manual resource configuration needed!
- Open HACS in Home Assistant
- Go to
...(three dots menu) →Custom repositories - Add repository:
- Repository:
https://github.com/nremey/HA_menstrual_gauge - Category: Integration
- Repository:
- Click
Installon "Menstruation Gauge" - Restart Home Assistant
- The integration can be added via UI (Settings > Devices & Services > Add Integration) or add to
configuration.yaml:
menstruation_gauge:- Restart Home Assistant again (if using YAML)
Note: The Lovelace card is automatically registered and available immediately after setup. No manual resource configuration is required! After restarting, reload your browser/view (hard refresh recommended: Ctrl+F5 or Cmd+Shift+R) to ensure the card is loaded.
- Copy integration folder:
- From:
custom_components/menstruation_gauge - To:
/config/custom_components/menstruation_gauge
- Add to
configuration.yaml:
menstruation_gauge:- Restart Home Assistant.
Note: The card file is served from custom_components/menstruation_gauge/www/menstruation-gauge-card.js and is has to be added as a Lovelace resource!
- Open Home Assistant.
- Go to
Settings->Dashboards. - Open your target dashboard.
- Click
⋮(top right) ->Resources. - Click
+ Add Resource. - Enter:
- URL:
custom_components/menstruation_gauge/www/menstruation-gauge-card.js - Type:
JavaScript Module
- URL:
- Save and reload browser (hard refresh recommended).
type: custom:menstruation-gauge-card
entity: sensor.menstruation_gauge
period_duration_days: 5
show_editor: trueThis project is for orientation and personal tracking support only. It is not medical advice and not suitable as a reliable method for contraception or conception planning.
The sensor.menstruation_gauge may be used for automation as you see fit. An Automation template (adding item to a shopping list) for an example is found in the ReadMe.md of the lovelace-mentruation-gauge-card folder.
A significant part of this project was created with AI assistance (OpenAI Codex), then reviewed and adjusted manually.
It is tested in practical use, but edge cases may still exist.

