diff --git a/homeassistant/components/bmw_connected_drive/config_flow.py b/homeassistant/components/bmw_connected_drive/config_flow.py index fc274fc0f54..636274a01ad 100644 --- a/homeassistant/components/bmw_connected_drive/config_flow.py +++ b/homeassistant/components/bmw_connected_drive/config_flow.py @@ -20,6 +20,7 @@ from homeassistant.config_entries import ( from homeassistant.const import CONF_PASSWORD, CONF_REGION, CONF_SOURCE, CONF_USERNAME from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import HomeAssistantError +from homeassistant.helpers.selector import SelectSelector, SelectSelectorConfig from . import DOMAIN from .const import CONF_ALLOWED_REGIONS, CONF_GCID, CONF_READ_ONLY, CONF_REFRESH_TOKEN @@ -28,7 +29,12 @@ DATA_SCHEMA = vol.Schema( { vol.Required(CONF_USERNAME): str, vol.Required(CONF_PASSWORD): str, - vol.Required(CONF_REGION): vol.In(CONF_ALLOWED_REGIONS), + vol.Required(CONF_REGION): SelectSelector( + SelectSelectorConfig( + options=CONF_ALLOWED_REGIONS, + translation_key="regions", + ) + ), } ) diff --git a/homeassistant/components/bmw_connected_drive/strings.json b/homeassistant/components/bmw_connected_drive/strings.json index 587b13f084d..e7606232411 100644 --- a/homeassistant/components/bmw_connected_drive/strings.json +++ b/homeassistant/components/bmw_connected_drive/strings.json @@ -159,5 +159,14 @@ "name": "Charging" } } + }, + "selector": { + "regions": { + "options": { + "china": "China", + "north_america": "North America", + "rest_of_world": "Rest of world" + } + } } }