Bump holidays to 0.16 (#78832)

This commit is contained in:
Tom Brien 2022-09-28 09:39:43 +01:00 committed by GitHub
parent 6ef33b1d39
commit 87dfe82613
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 7 deletions

View File

@ -6,7 +6,7 @@ import logging
from typing import Any from typing import Any
import holidays import holidays
from holidays import HolidayBase from holidays import DateLike, HolidayBase
import voluptuous as vol import voluptuous as vol
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
@ -87,7 +87,7 @@ def setup_platform(
discovery_info: DiscoveryInfoType | None = None, discovery_info: DiscoveryInfoType | None = None,
) -> None: ) -> None:
"""Set up the Workday sensor.""" """Set up the Workday sensor."""
add_holidays: list[str] = config[CONF_ADD_HOLIDAYS] add_holidays: list[DateLike] = config[CONF_ADD_HOLIDAYS]
remove_holidays: list[str] = config[CONF_REMOVE_HOLIDAYS] remove_holidays: list[str] = config[CONF_REMOVE_HOLIDAYS]
country: str = config[CONF_COUNTRY] country: str = config[CONF_COUNTRY]
days_offset: int = config[CONF_OFFSET] days_offset: int = config[CONF_OFFSET]
@ -138,8 +138,10 @@ def setup_platform(
_LOGGER.debug("No holidays to remove or invalid holidays") _LOGGER.debug("No holidays to remove or invalid holidays")
_LOGGER.debug("Found the following holidays for your configuration:") _LOGGER.debug("Found the following holidays for your configuration:")
for remove_holiday, name in sorted(obj_holidays.items()): for holiday_date, name in sorted(obj_holidays.items()):
_LOGGER.debug("%s %s", remove_holiday, name) # Make explicit str variable to avoid "Incompatible types in assignment"
_holiday_string = holiday_date.strftime("%Y-%m-%d")
_LOGGER.debug("%s %s", _holiday_string, name)
add_entities( add_entities(
[IsWorkdaySensor(obj_holidays, workdays, excludes, days_offset, sensor_name)], [IsWorkdaySensor(obj_holidays, workdays, excludes, days_offset, sensor_name)],

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.14.2"], "requirements": ["holidays==0.16"],
"codeowners": ["@fabaff"], "codeowners": ["@fabaff"],
"quality_scale": "internal", "quality_scale": "internal",
"iot_class": "local_polling", "iot_class": "local_polling",

View File

@ -859,7 +859,7 @@ hlk-sw16==0.0.9
hole==0.7.0 hole==0.7.0
# homeassistant.components.workday # homeassistant.components.workday
holidays==0.14.2 holidays==0.16
# homeassistant.components.frontend # homeassistant.components.frontend
home-assistant-frontend==20220907.2 home-assistant-frontend==20220907.2

View File

@ -639,7 +639,7 @@ hlk-sw16==0.0.9
hole==0.7.0 hole==0.7.0
# homeassistant.components.workday # homeassistant.components.workday
holidays==0.14.2 holidays==0.16
# homeassistant.components.frontend # homeassistant.components.frontend
home-assistant-frontend==20220907.2 home-assistant-frontend==20220907.2