The 'anniversaries' component is a Home Assistant custom sensor which counts down to a recurring date such as birthdays, but can be used for any anniversary which occurs annually on the same date.
Any anniversaries entries configured will be added to the home assistant calendar.  This also generates the calendar.anniversaries entity, which shows information about the next configured anniversary. N.B. At the moment, only the next occurence of the anniversaries are added to the calendar
- Download the anniversaries.zipfile from the latest release.
- Unpack the release and copy the custom_components/anniversariesdirectory into thecustom_componentsdirectory of your Home Assistant installation.
- Configure the anniversariessensor.
- Restart Home Assistant.
- Ensure that HACS is installed.
- Search for and install the "anniversaries" integration.
- Configure the anniversariessensor.
- Restart Home Assistant.
Anniversaries can be configured on the integrations menu or in configuration.yaml
In Configuration/Integrations click on the + button, select Anniversaries and configure the options on the form.
Add anniversaries sensor in your configuration.yaml. The following example adds two sensors - Shakespeare's birthday and wedding anniversary!
# Example configuration.yaml entry
anniversaries:
  sensors:
  - name: Shakespeare's Birthday
    date: '1564-04-23'
  - name: Shakespeare's Wedding Anniversary
    date: '1582-11-27'| Parameter | Optional | Description | 
|---|---|---|
| name | No | Friendly name | 
| date | Either dateordate_templateMUST be included | date in format 'YYYY-MM-DD'(or'MM-DD'if year is unknown) | 
| date_template | Either dateordate_templateMUST be included | Template to evaluate date from (Note this is ONLY available in YAML configuration) The template must return a string in either 'YYYY-MM-DD'or'MM-DD'format, ie:date_template: '{{ states("input_datetime.your_input_datetime") | string }}' | 
| count_up | Yes | trueorfalsechanges the state to count up from a date (can be useful for non-recurring events) Default:false | 
| one_time | Yes | trueorfalse. For a one-time event (Non-recurring) Default:false | 
| show_half_anniversary | Yes | trueorfalse. Enables thehalf_anniversary_dateanddays_until_half_anniversaryattributes. Default:false | 
| unit_of_measurement | Yes | Your choice of label N.B. The sensor always returns Days, but this option allows you to express this in the language of your choice without needing a customization | 
| id_prefix | Yes | Your choice of prefix for the entity_id Default: anniversary_NB. the entity_id cannot be changed from within the integration once it has been created.  You muse either delete your entity and re-create it or manually rename the entity_id on the configuration -> entities page | 
| icon_normal | Yes | Default icon Default: mdi:calendar-blank | 
| icon_today | Yes | Icon if the anniversary is today Default: mdi:calendar-star | 
| days_as_soon | Yes | Days in advance to display the icon defined in icon_soonDefault: 1 | 
| icon_soon | Yes | Icon if the anniversary is 'soon' Default: mdi:calendar | 
- The number of days remaining to the next occurance. (or days since last occurence if you have chosen the count up option)
- years at anniversary: number of years that will have passed at the occurrence counted down to (NOT displayed if year is unknown)
- current years: number of years have passed since the first occurance (ie, current age) (NOT displayed if year is unknown)
- date: The date of the first occurence (or the date of the next occurence if year is unknown)
- next_date: The date of the next occurance
- weeks_remaining: The number of weeks until the anniversary
- unit_of_measurement: 'Days' By default, this is displayed after the state. this is NOT translate-able. See below for work-around
- half_anniversary_date: The date of the next half anniversary (if enabled by show_half_anniversary)
- days_until_half_anniversary: The number of days until the next half anniversary
Unit_of_measurement is not translate-able. You can, however, change the text for unit of measurement in the configuration. NB the sensor will always report in days, this just allows you to represent this in your own language.
