Refactor deprecated workday argument (#111379)

This commit is contained in:
Marc Mueller 2024-02-25 13:04:02 +01:00 committed by GitHub
parent a94f8bd14d
commit 49ae81c5c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,7 +38,7 @@ def _validate_country_and_province(
if not province:
return
try:
country_holidays(country, prov=province)
country_holidays(country, subdiv=province)
except NotImplementedError as ex:
async_create_issue(
hass,
@ -68,7 +68,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
_validate_country_and_province(hass, entry, country, province)
if country and CONF_LANGUAGE not in entry.options:
cls: HolidayBase = country_holidays(country, prov=province)
cls: HolidayBase = country_holidays(country, subdiv=province)
default_language = cls.default_language
new_options = entry.options.copy()
new_options[CONF_LANGUAGE] = default_language