1010 CannotAuthenticate ,
1111 CannotConnect ,
1212 CannotRetrieveData ,
13- WrongCountry ,
1413)
1514import voluptuous as vol
1615
1716from homeassistant .config_entries import ConfigFlow , ConfigFlowResult
18- from homeassistant .const import CONF_CODE , CONF_COUNTRY , CONF_PASSWORD , CONF_USERNAME
17+ from homeassistant .const import CONF_CODE , CONF_PASSWORD , CONF_USERNAME
1918from homeassistant .core import HomeAssistant
2019from homeassistant .helpers import aiohttp_client
2120import homeassistant .helpers .config_validation as cv
22- from homeassistant .helpers .selector import CountrySelector
2321
2422from .const import CONF_LOGIN_DATA , DOMAIN
2523
@@ -37,7 +35,6 @@ async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str,
3735 session = aiohttp_client .async_create_clientsession (hass )
3836 api = AmazonEchoApi (
3937 session ,
40- data [CONF_COUNTRY ],
4138 data [CONF_USERNAME ],
4239 data [CONF_PASSWORD ],
4340 )
@@ -48,6 +45,9 @@ async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str,
4845class AmazonDevicesConfigFlow (ConfigFlow , domain = DOMAIN ):
4946 """Handle a config flow for Alexa Devices."""
5047
48+ VERSION = 1
49+ MINOR_VERSION = 1
50+
5151 async def async_step_user (
5252 self , user_input : dict [str , Any ] | None = None
5353 ) -> ConfigFlowResult :
@@ -62,8 +62,6 @@ async def async_step_user(
6262 errors ["base" ] = "invalid_auth"
6363 except CannotRetrieveData :
6464 errors ["base" ] = "cannot_retrieve_data"
65- except WrongCountry :
66- errors ["base" ] = "wrong_country"
6765 else :
6866 await self .async_set_unique_id (data ["customer_info" ]["user_id" ])
6967 self ._abort_if_unique_id_configured ()
@@ -78,9 +76,6 @@ async def async_step_user(
7876 errors = errors ,
7977 data_schema = vol .Schema (
8078 {
81- vol .Required (
82- CONF_COUNTRY , default = self .hass .config .country
83- ): CountrySelector (),
8479 vol .Required (CONF_USERNAME ): cv .string ,
8580 vol .Required (CONF_PASSWORD ): cv .string ,
8681 vol .Required (CONF_CODE ): cv .string ,
0 commit comments