From ab247b0f4d6a85a3fa070d88b4f810e78fcf91d6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 10 Apr 2017 16:13:43 +0200 Subject: [PATCH] Fix US states check (fixes #7015) (#7017) --- homeassistant/components/binary_sensor/workday.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/binary_sensor/workday.py b/homeassistant/components/binary_sensor/workday.py index c2590925df7..c25ea81922b 100644 --- a/homeassistant/components/binary_sensor/workday.py +++ b/homeassistant/components/binary_sensor/workday.py @@ -66,8 +66,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None): obj_holidays = getattr(holidays, country)(years=year) if province: - if province not in obj_holidays.PROVINCES: - _LOGGER.error('There is no province/state %s in country %s', + if province not in obj_holidays.PROVINCES and \ + province not in obj_holidays.STATES: + _LOGGER.error("There is no province/state %s in country %s", province, country) return False else: