diff --git a/homeassistant/components/whirlpool/__init__.py b/homeassistant/components/whirlpool/__init__.py index 86d1495d6dc..3aa85403d12 100644 --- a/homeassistant/components/whirlpool/__init__.py +++ b/homeassistant/components/whirlpool/__init__.py @@ -13,7 +13,7 @@ from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import CONF_BRAND, CONF_BRANDS_MAP, CONF_REGIONS_MAP, DOMAIN +from .const import BRANDS_CONF_MAP, CONF_BRAND, DOMAIN, REGIONS_CONF_MAP _LOGGER = logging.getLogger(__name__) @@ -25,8 +25,8 @@ type WhirlpoolConfigEntry = ConfigEntry[AppliancesManager] async def async_setup_entry(hass: HomeAssistant, entry: WhirlpoolConfigEntry) -> bool: """Set up Whirlpool Sixth Sense from a config entry.""" session = async_get_clientsession(hass) - region = CONF_REGIONS_MAP[entry.data.get(CONF_REGION, "EU")] - brand = CONF_BRANDS_MAP[entry.data.get(CONF_BRAND, "Whirlpool")] + region = REGIONS_CONF_MAP[entry.data.get(CONF_REGION, "EU")] + brand = BRANDS_CONF_MAP[entry.data.get(CONF_BRAND, "Whirlpool")] backend_selector = BackendSelector(brand, region) auth = Auth( diff --git a/homeassistant/components/whirlpool/config_flow.py b/homeassistant/components/whirlpool/config_flow.py index 19715643e3a..61d6883d70f 100644 --- a/homeassistant/components/whirlpool/config_flow.py +++ b/homeassistant/components/whirlpool/config_flow.py @@ -17,7 +17,7 @@ from homeassistant.const import CONF_PASSWORD, CONF_REGION, CONF_USERNAME from homeassistant.core import HomeAssistant from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import CONF_BRAND, CONF_BRANDS_MAP, CONF_REGIONS_MAP, DOMAIN +from .const import BRANDS_CONF_MAP, CONF_BRAND, DOMAIN, REGIONS_CONF_MAP _LOGGER = logging.getLogger(__name__) @@ -26,15 +26,15 @@ STEP_USER_DATA_SCHEMA = vol.Schema( { vol.Required(CONF_USERNAME): str, vol.Required(CONF_PASSWORD): str, - vol.Required(CONF_REGION): vol.In(list(CONF_REGIONS_MAP)), - vol.Required(CONF_BRAND): vol.In(list(CONF_BRANDS_MAP)), + vol.Required(CONF_REGION): vol.In(list(REGIONS_CONF_MAP)), + vol.Required(CONF_BRAND): vol.In(list(BRANDS_CONF_MAP)), } ) REAUTH_SCHEMA = vol.Schema( { vol.Required(CONF_PASSWORD): str, - vol.Required(CONF_BRAND): vol.In(list(CONF_BRANDS_MAP)), + vol.Required(CONF_BRAND): vol.In(list(BRANDS_CONF_MAP)), } ) @@ -48,8 +48,8 @@ async def authenticate( Returns the error translation key if authentication fails, or None on success. """ session = async_get_clientsession(hass) - region = CONF_REGIONS_MAP[data[CONF_REGION]] - brand = CONF_BRANDS_MAP[data[CONF_BRAND]] + region = REGIONS_CONF_MAP[data[CONF_REGION]] + brand = BRANDS_CONF_MAP[data[CONF_BRAND]] backend_selector = BackendSelector(brand, region) auth = Auth(backend_selector, data[CONF_USERNAME], data[CONF_PASSWORD], session) diff --git a/homeassistant/components/whirlpool/const.py b/homeassistant/components/whirlpool/const.py index 63a58f54c1d..163229e4a21 100644 --- a/homeassistant/components/whirlpool/const.py +++ b/homeassistant/components/whirlpool/const.py @@ -5,12 +5,12 @@ from whirlpool.backendselector import Brand, Region DOMAIN = "whirlpool" CONF_BRAND = "brand" -CONF_REGIONS_MAP = { +REGIONS_CONF_MAP = { "EU": Region.EU, "US": Region.US, } -CONF_BRANDS_MAP = { +BRANDS_CONF_MAP = { "Whirlpool": Brand.Whirlpool, "Maytag": Brand.Maytag, "KitchenAid": Brand.KitchenAid,