Bump holidays to 0.13 (#66612)

This commit is contained in:
Vaclav 2022-02-17 20:59:50 +01:00 committed by GitHub
parent dacc2b1ab0
commit 0bebf14e45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 12 deletions

View File

@ -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

View File

@ -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",

View File

@ -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

View File

@ -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