Giter Site home page Giter Site logo

iainphay / holidays Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bruxy70/holidays

0.0 0.0 0.0 4.19 MB

๐Ÿ“… Custom Home Assistant integration for public holidays - also used for garbage_collection integration to automatically move scheduled events that fall on a public holiday (by an automation blueprint)

License: MIT License

Python 100.00%

holidays's Introduction

hacs_badge Holidays Maintenance

Buy me a coffee

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

  1. Download the latest release.
  2. Unpack the release and copy the custom_components/holidays directory into the custom_components directory of your Home Assistant installation.
  3. Restart Home Assistant.
  4. Add the Holidays helper

INSTALLATION VIA Home Assistant Community Store (HACS)

  1. Ensure that HACS is installed.
  2. Search for and install the "Holidays" integration.
  3. Restart Home Assistant.
  4. Go to Settings/Devices & Services/Helpers hit the + CREATE HELPER button and and add the Holidays helper.
  5. Configure the parameters
  6. If you would like to add more than 1 calendar, click on the + CREATE HELPER button again and add another Holidays helper 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.