mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +00:00
Bump holidays to 0.16 (#78832)
This commit is contained in:
parent
6ef33b1d39
commit
87dfe82613
@ -6,7 +6,7 @@ import logging
|
||||
from typing import Any
|
||||
|
||||
import holidays
|
||||
from holidays import HolidayBase
|
||||
from holidays import DateLike, HolidayBase
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
@ -87,7 +87,7 @@ def setup_platform(
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
) -> None:
|
||||
"""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]
|
||||
country: str = config[CONF_COUNTRY]
|
||||
days_offset: int = config[CONF_OFFSET]
|
||||
@ -138,8 +138,10 @@ def setup_platform(
|
||||
_LOGGER.debug("No holidays to remove or invalid holidays")
|
||||
|
||||
_LOGGER.debug("Found the following holidays for your configuration:")
|
||||
for remove_holiday, name in sorted(obj_holidays.items()):
|
||||
_LOGGER.debug("%s %s", remove_holiday, name)
|
||||
for holiday_date, name in sorted(obj_holidays.items()):
|
||||
# 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(
|
||||
[IsWorkdaySensor(obj_holidays, workdays, excludes, days_offset, sensor_name)],
|
||||
|
@ -2,7 +2,7 @@
|
||||
"domain": "workday",
|
||||
"name": "Workday",
|
||||
"documentation": "https://www.home-assistant.io/integrations/workday",
|
||||
"requirements": ["holidays==0.14.2"],
|
||||
"requirements": ["holidays==0.16"],
|
||||
"codeowners": ["@fabaff"],
|
||||
"quality_scale": "internal",
|
||||
"iot_class": "local_polling",
|
||||
|
@ -859,7 +859,7 @@ hlk-sw16==0.0.9
|
||||
hole==0.7.0
|
||||
|
||||
# homeassistant.components.workday
|
||||
holidays==0.14.2
|
||||
holidays==0.16
|
||||
|
||||
# homeassistant.components.frontend
|
||||
home-assistant-frontend==20220907.2
|
||||
|
@ -639,7 +639,7 @@ hlk-sw16==0.0.9
|
||||
hole==0.7.0
|
||||
|
||||
# homeassistant.components.workday
|
||||
holidays==0.14.2
|
||||
holidays==0.16
|
||||
|
||||
# homeassistant.components.frontend
|
||||
home-assistant-frontend==20220907.2
|
||||
|
Loading…
x
Reference in New Issue
Block a user