diff --git a/homeassistant/components/workday/config_flow.py b/homeassistant/components/workday/config_flow.py index 907f5c5bdb5..c4b1f1ba3fd 100644 --- a/homeassistant/components/workday/config_flow.py +++ b/homeassistant/components/workday/config_flow.py @@ -54,7 +54,7 @@ def add_province_to_schema( if not country: return schema - all_countries = list_supported_countries() + all_countries = list_supported_countries(include_aliases=False) if not all_countries.get(country): return schema @@ -117,7 +117,7 @@ DATA_SCHEMA_SETUP = vol.Schema( vol.Required(CONF_NAME, default=DEFAULT_NAME): TextSelector(), vol.Optional(CONF_COUNTRY): CountrySelector( CountrySelectorConfig( - countries=list(list_supported_countries()), + countries=list(list_supported_countries(include_aliases=False)), ) ), } diff --git a/homeassistant/components/workday/repairs.py b/homeassistant/components/workday/repairs.py index daafd0396b8..fbed179763e 100644 --- a/homeassistant/components/workday/repairs.py +++ b/homeassistant/components/workday/repairs.py @@ -43,7 +43,7 @@ class CountryFixFlow(RepairsFlow): ) -> data_entry_flow.FlowResult: """Handle the country step of a fix flow.""" if user_input is not None: - all_countries = list_supported_countries() + all_countries = list_supported_countries(include_aliases=False) if not all_countries[user_input[CONF_COUNTRY]]: options = dict(self.entry.options) new_options = {**options, **user_input, CONF_PROVINCE: None} @@ -61,7 +61,9 @@ class CountryFixFlow(RepairsFlow): { vol.Required(CONF_COUNTRY): SelectSelector( SelectSelectorConfig( - options=sorted(list_supported_countries()), + options=sorted( + list_supported_countries(include_aliases=False) + ), mode=SelectSelectorMode.DROPDOWN, ) ) @@ -83,7 +85,9 @@ class CountryFixFlow(RepairsFlow): return self.async_create_entry(data={}) assert self.country - country_provinces = list_supported_countries()[self.country] + country_provinces = list_supported_countries(include_aliases=False)[ + self.country + ] return self.async_show_form( step_id="province", data_schema=vol.Schema(