Holidays
December 28, 2023 ยท View on GitHub
End of Support
Home Assistant has introduced native holiday integration in the 2024.1 release. I have therefore ended developing this custom integration.
Holidays
The holidays component is a Home Assistant helper that creates calendar entities with a list of public holidays in a country, based on the Python Holidays library.
It's primary purpose is to work with garbage_collection helper to automatically move entities with manual_update automation blueprints. But it can also be used independently to show the next public holiday in a given country (or multiple countries).
Table of Contents
Installation
MANUAL INSTALLATION
- Download the latest release.
- Unpack the release and copy the
custom_components/holidaysdirectory into thecustom_componentsdirectory of your Home Assistant installation. - Restart Home Assistant.
- Add the
Holidayshelper
INSTALLATION VIA Home Assistant Community Store (HACS)
- Ensure that HACS is installed.
- Search for and install the "Holidays" integration.
- Restart Home Assistant.
- Go to
Settings/Devices & Services/Helpershit the+ CREATE HELPERbutton and and add theHolidayshelper. - Configure the parameters
- If you would like to add more than 1 calendar, click on the
+ CREATE HELPERbutton again and add anotherHolidayshelper instance.
Parameters
| Parameter | Required | Description |
|---|---|---|
Country | Yes | Country holidays - the country code (see holidays for the list of valid country codes). Example: US |
Observed | No | Observed - when holidays are celebrated on dates that are not the actual event's anniversary date (see holidays ). |
Subdivision | No | State/Province/District... (see holidays ). |
Pop named holidays | No | Ignore holidays (select from the list of holiday names) Example: "Columbus Day", "Veterans Day" |
State and Attributes
state
The State contains the number of days to the next country holiday. It is 0 if today is a public holiday.
Attributes
| Attribute | Description |
|---|---|
next_date | The date of the next holiday |
next_holiday | The name of the next holiday |
holidays | List of country holidays (last year, this year, and next year). This is used by the garbage_collection blueprints to offset collections if they fall on a public holiday (or if the holiday was earlier on in the week) |