2023.8 workday unavailable - config broken - country subdivision

I use the workday integration to limit my alarm clock automation from only running on workdays.
After the 2023.8 update the workday entity was returning the state of ‘unavailable’, making my alarm clock fail to start this morning.
After a bit of investigating, it seems the previous subdivision of country that I had set from the config wizard (England in the GB country), had suddenly become invalid, it now needs to be ‘ENG’.
This appeared in the logs after updating to 2023.8:

There is no subdivision England in country GB

I’m just posting this to try and help others with the same problem! Perhaps it will affect other countries/subdivisions too!

2 Likes

Perhaps check if the issue was reported on GitHub. It looks like the library used switched to the ISO alpha-3 codes. I’d think HA should’ve included an upgrade path in the code to update its config when upgrading the dependency. Maybe they can still do that in a next release.

Hmm, according to the docs the 2-digit code should be valid.

We currently support 131 country codes. The standard way to refer to a country is by using its ISO 3166-1 alpha-2 code, the same used for domain names, and for a subdivision its ISO 3166-2 code.

EDIT 1: Something’s up: On the library page it’s stating the subdivision can be the 2-digit code, but in the table below that it states the 3-digit code.

EDIT 2: I confused myself. It seems that according to the ISO standard the GB subdivision is actually a 3-digit code. I wonder if HA / the integration did it’s own mapping.

Each code consists of two parts, separated by a hyphen. The first part is GB, the ISO 3166-1 alpha-2 code of the United Kingdom. The second part is three letters, which is the British Standard BS 6879 three-letter code of the subdivision.

I had a similar problem with the sub-division “Wales” changing to “WLS”.

This is a breaking change and the doc’s show the following:

In your case I think you need to change the sub-division of “England” to “ENG”. This can be done within the Workday Integration so no restart is required.

Yes, this is exactly what I had to do. Setting workdays region to ‘GB’ and ‘ENG’ is working. The previous config used ‘GB’ and ‘England’ which broke the integration.
It would have been handy to have this flagged up somewhere as a breaking change before or after the upgrade to 2023.8…
Luckily I woke up in time this morning anyway :sleeping: :roll_eyes:

I just came here because it was broken for me as well, would have been nice if the repair section highlighted it instead of just silently failing. Worst part is I always read the release notes but didn’t see this at all :disappointed_relieved:

1 Like