developers.home-assistant/blog/2023-10-12-country_selector.md

598 B

author authorURL title
G Johansson https://github.com/gjohansson-ST Country selector

Selectors has been expanded and now also includes a CountrySelector.

Using this in config flows will allow frontend to automatically translate the country codes into the proper country names.

Example:

vol.Schema(
    {
        vol.Optional(CONF_COUNTRY): CountrySelector(
            CountrySelectorConfig(
                countries=["DE", "US"],
            )
        ),
    }
)