diff --git a/homeassistant/components/nexia/__init__.py b/homeassistant/components/nexia/__init__.py index 9a595ab7a94..122f00f7b59 100644 --- a/homeassistant/components/nexia/__init__.py +++ b/homeassistant/components/nexia/__init__.py @@ -65,6 +65,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): username = conf[CONF_USERNAME] password = conf[CONF_PASSWORD] + state_file = hass.config.path(f"nexia_config_{username}.conf") + try: nexia_home = await hass.async_add_executor_job( partial( @@ -72,6 +74,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): username=username, password=password, device_name=hass.config.location_name, + state_file=state_file, ) ) except ConnectTimeout as ex: diff --git a/homeassistant/components/nexia/config_flow.py b/homeassistant/components/nexia/config_flow.py index d99be94aaf9..c26e42a22d2 100644 --- a/homeassistant/components/nexia/config_flow.py +++ b/homeassistant/components/nexia/config_flow.py @@ -25,6 +25,8 @@ async def validate_input(hass: core.HomeAssistant, data): Data has the keys from DATA_SCHEMA with values provided by the user. """ + + state_file = hass.config.path(f"nexia_config_{data[CONF_USERNAME]}.conf") try: nexia_home = NexiaHome( username=data[CONF_USERNAME], @@ -32,6 +34,7 @@ async def validate_input(hass: core.HomeAssistant, data): auto_login=False, auto_update=False, device_name=hass.config.location_name, + state_file=state_file, ) await hass.async_add_executor_job(nexia_home.login) except ConnectTimeout as ex: diff --git a/homeassistant/components/nexia/manifest.json b/homeassistant/components/nexia/manifest.json index a58330ad227..f09d4d1a4d1 100644 --- a/homeassistant/components/nexia/manifest.json +++ b/homeassistant/components/nexia/manifest.json @@ -1,7 +1,7 @@ { "domain": "nexia", "name": "Nexia", - "requirements": ["nexia==0.9.1"], + "requirements": ["nexia==0.9.2"], "codeowners": ["@ryannazaretian", "@bdraco"], "documentation": "https://www.home-assistant.io/integrations/nexia", "config_flow": true diff --git a/requirements_all.txt b/requirements_all.txt index f25a7b25505..5ca56644cef 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -924,7 +924,7 @@ netdisco==2.6.0 neurio==0.3.1 # homeassistant.components.nexia -nexia==0.9.1 +nexia==0.9.2 # homeassistant.components.nextcloud nextcloudmonitor==1.1.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index aa49dc935e7..39ce1127659 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -359,7 +359,7 @@ nessclient==0.9.15 netdisco==2.6.0 # homeassistant.components.nexia -nexia==0.9.1 +nexia==0.9.2 # homeassistant.components.nsw_fuel_station nsw-fuel-api-client==1.0.10