mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Bump holidays to 0.13 (#66612)
This commit is contained in:
parent
dacc2b1ab0
commit
0bebf14e45
@ -96,16 +96,13 @@ def setup_platform(
|
|||||||
obj_holidays = getattr(holidays, country)(years=year)
|
obj_holidays = getattr(holidays, country)(years=year)
|
||||||
|
|
||||||
if province:
|
if province:
|
||||||
# 'state' and 'prov' are not interchangeable, so need to make
|
if (
|
||||||
# sure we use the right one
|
hasattr(obj_holidays, "subdivisions")
|
||||||
if hasattr(obj_holidays, "PROVINCES") and province in obj_holidays.PROVINCES:
|
and province in obj_holidays.subdivisions
|
||||||
obj_holidays = getattr(holidays, country)(prov=province, years=year)
|
):
|
||||||
elif hasattr(obj_holidays, "STATES") and province in obj_holidays.STATES:
|
obj_holidays = getattr(holidays, country)(subdiv=province, years=year)
|
||||||
obj_holidays = getattr(holidays, country)(state=province, years=year)
|
|
||||||
else:
|
else:
|
||||||
_LOGGER.error(
|
_LOGGER.error("There is no subdivision %s in country %s", province, country)
|
||||||
"There is no province/state %s in country %s", province, country
|
|
||||||
)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
# Add custom holidays
|
# Add custom holidays
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "workday",
|
"domain": "workday",
|
||||||
"name": "Workday",
|
"name": "Workday",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/workday",
|
"documentation": "https://www.home-assistant.io/integrations/workday",
|
||||||
"requirements": ["holidays==0.12"],
|
"requirements": ["holidays==0.13"],
|
||||||
"codeowners": ["@fabaff"],
|
"codeowners": ["@fabaff"],
|
||||||
"quality_scale": "internal",
|
"quality_scale": "internal",
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
|
@ -830,7 +830,7 @@ hlk-sw16==0.0.9
|
|||||||
hole==0.7.0
|
hole==0.7.0
|
||||||
|
|
||||||
# homeassistant.components.workday
|
# homeassistant.components.workday
|
||||||
holidays==0.12
|
holidays==0.13
|
||||||
|
|
||||||
# homeassistant.components.frontend
|
# homeassistant.components.frontend
|
||||||
home-assistant-frontend==20220214.0
|
home-assistant-frontend==20220214.0
|
||||||
|
@ -543,7 +543,7 @@ hlk-sw16==0.0.9
|
|||||||
hole==0.7.0
|
hole==0.7.0
|
||||||
|
|
||||||
# homeassistant.components.workday
|
# homeassistant.components.workday
|
||||||
holidays==0.12
|
holidays==0.13
|
||||||
|
|
||||||
# homeassistant.components.frontend
|
# homeassistant.components.frontend
|
||||||
home-assistant-frontend==20220214.0
|
home-assistant-frontend==20220214.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user