Workday sensor giving invalid config on 2022.3.0

After updating to 2022.3 i’m getting an invalid config error for my binary_sensor.workday:

Invalid config for [binary_sensor.workday]: Country is not supported. for dictionary value @ data['country']. Got 'IE'.

This is my config:

- platform: workday
  country: IE
  workdays: [mon, tue, wed, thu, fri]
  excludes: [sat, sun, holiday]

I note that there were some changes to workdays in this release, but nothing breaking. I’ve checked the country code for Ireland and it’s correct.

There seems to be an issue with the Holidays Library that’s used for this component…there are issues open on GitHub for it…think we just need to wait until its fixed :roll_eyes:

https://github.com/dr-prodigy/python-holidays/issues/636
https://github.com/home-assistant/core/issues/67542
https://github.com/bruxy70/Holidays/issues/28
1 Like

Yes, I’ve been tracking it over there as well. Look like the Python library needs to be updated.

Looks like you need to specify country and province - see docs at Workday - Home Assistant for a link to the list of provinces… for me the below brought things back to life…

 platform: workday
  country: GB
  province: England
  workdays: [mon, tue, wed, thu, fri]

Thanks @squiggleuk, but this problem seems to only affect Ireland. For some reason it seems to have been included as a sub-class of the UK definition :astonished: @Gav_in has posted links above to the issue.

1 Like

I was getting similar error for specifying country as ‘England’ - there’s a change here impacting both for sure

from a technical perspective think the problem is that Ireland hasn’t been specified as either a class/top-level entry (eg Country) or a sub-class entry (eg Province) so doesn’t show up as an option anywhere…think either would work (technically) if the library was updated, obviously only one is right from a real world perspective :thinking: :man_shrugging:t2:
As noted above I think we just need to sit tight until the library is updated

slightly off the Ireland not there topic, but this should work for you…
you have to specify country and then province if you want to drill to a more specific level.

  - platform: workday
    country: GB #without a province default is UK (i.e. whole UK)
    province: England
    workdays: [mon, tue, wed, thu, fri]
    excludes: [sat, sun, holiday]

now back to WFT Ireland isn’t there anymore :thinking: :grin:

1 Like

Thanks for this. Hopefully this morning will be the last time that my automations think it is a holiday and gives everyone a lie-in when it is a workday in England. (It is St Patrick’s Day today, which is a holiday in Northern Ireland.)

Just a heads up that since the release of 2022.7.0 the IE country code for Ireland is working again.

2 Likes