Ensure nexia state file is in a writable location (#34325)

* bump nexia to 0.9.2
pull/34349/head
J. Nick Koston 2020-04-17 10:55:04 -05:00 committed by GitHub
parent d672eed331
commit 660b1dc1e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 3 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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