Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Lindvig authored Jan 16, 2023
1 parent 8e81806 commit 44853fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions custom_components/flagdays_dk/flagdays_dk.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@
"CHRISTS_ASCENSION": "Kristi Himmelfartsdag",
"EASTER_SUNDAY": "Påskedag",
"GOOD_FRIDAY": "Langfredag",
"OCCUPATION_DAY": "Besættelsesdagen",
"PENTECOST": "Pinsedag",
"ROYAL": "Kongelige",
"ROYAL": ["Kongelige", "Majestæt"],
}
HALF_MAST_DAYS = [STRINGS["GOOD_FRIDAY"], "Besættelsesdagen"]

REGULAR_FLAGDAYS = {
"Nytårsdag": {KEY_DATE: "1-1"},
"Hendes Kongelige Højhed Kronprinsesse Marys fødselsdag": {KEY_DATE: "5-2-1972"},
"Hendes Kongelige Højhed Prinsesse Maries fødselsdag": {KEY_DATE: "6-2-1976"},
"Besættelsesdagen": {KEY_DATE: "9-4", KEY_PRIORITY: 20},
"Besættelsesdagen": {KEY_DATE: "9-4-1940", KEY_PRIORITY: 20},
"Hendes Majestæt Dronningens fødselsdag": {KEY_DATE: "16-4-1940"},
"Hendes Kongelige Højhed Prinsesse Benediktes fødselsdag": {KEY_DATE: "29-4-1944"},
STRINGS["OCCUPATION_DAY"]: {KEY_DATE: "5-5"},
"Befrielsesdagen": {KEY_DATE: "5-5-1945"},
"Hans Kongelige Højhed Kronprins Frederiks fødselsdag": {KEY_DATE: "26-5-1968"},
"Grundlovsdag": {KEY_DATE: "5-6"},
"Grundlovsdag": {KEY_DATE: "5-6-1849"},
"Hans Kongelige Højhed Prins Joachims fødselsdag": {KEY_DATE: "7-7-1969"},
"Valdemarsdag og genforeningsdag": {KEY_DATE: "15-6"},
"Grønlands nationaldag": {KEY_DATE: "21-6", KEY_FLAG: "Erfalasorput"},
Expand All @@ -52,7 +52,7 @@


class flagdays_dk:
def __init__(self, include=None, exclude=None):
def __init__(self, include=[], exclude=[]):
self._flagdays = []
self._days = -1
self._in_exclude = {
Expand Down Expand Up @@ -192,14 +192,14 @@ def __init__(self, name=str, data=dict):
)

# Halfmast
if self._name in STRINGS.values():
if self._name in HALF_MAST_DAYS:
self._halfMast = (
True
if self._name == STRINGS["GOOD_FRIDAY"]
else datetime.strptime("12:00", "%H:%M").time()
)

if STRINGS["ROYAL"] in name:
if name in STRINGS["ROYAL"]:
self._priority = 30

self._priority = (
Expand Down
2 changes: 1 addition & 1 deletion custom_components/flagdays_dk/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"codeowners": ["@J-Lindvig"],
"requirements": ["astral"],
"iot_class": "calculated",
"version": "3.0"
"version": "3.0.1"
}

0 comments on commit 44853fc

Please sign in to comment.