mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Ensure nexia state file is in a writable location (#34325)
* bump nexia to 0.9.2
This commit is contained in:
parent
d672eed331
commit
660b1dc1e4
@ -65,6 +65,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
|||||||
username = conf[CONF_USERNAME]
|
username = conf[CONF_USERNAME]
|
||||||
password = conf[CONF_PASSWORD]
|
password = conf[CONF_PASSWORD]
|
||||||
|
|
||||||
|
state_file = hass.config.path(f"nexia_config_{username}.conf")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
nexia_home = await hass.async_add_executor_job(
|
nexia_home = await hass.async_add_executor_job(
|
||||||
partial(
|
partial(
|
||||||
@ -72,6 +74,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
|||||||
username=username,
|
username=username,
|
||||||
password=password,
|
password=password,
|
||||||
device_name=hass.config.location_name,
|
device_name=hass.config.location_name,
|
||||||
|
state_file=state_file,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
except ConnectTimeout as ex:
|
except ConnectTimeout as ex:
|
||||||
|
@ -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.
|
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:
|
try:
|
||||||
nexia_home = NexiaHome(
|
nexia_home = NexiaHome(
|
||||||
username=data[CONF_USERNAME],
|
username=data[CONF_USERNAME],
|
||||||
@ -32,6 +34,7 @@ async def validate_input(hass: core.HomeAssistant, data):
|
|||||||
auto_login=False,
|
auto_login=False,
|
||||||
auto_update=False,
|
auto_update=False,
|
||||||
device_name=hass.config.location_name,
|
device_name=hass.config.location_name,
|
||||||
|
state_file=state_file,
|
||||||
)
|
)
|
||||||
await hass.async_add_executor_job(nexia_home.login)
|
await hass.async_add_executor_job(nexia_home.login)
|
||||||
except ConnectTimeout as ex:
|
except ConnectTimeout as ex:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"domain": "nexia",
|
"domain": "nexia",
|
||||||
"name": "Nexia",
|
"name": "Nexia",
|
||||||
"requirements": ["nexia==0.9.1"],
|
"requirements": ["nexia==0.9.2"],
|
||||||
"codeowners": ["@ryannazaretian", "@bdraco"],
|
"codeowners": ["@ryannazaretian", "@bdraco"],
|
||||||
"documentation": "https://www.home-assistant.io/integrations/nexia",
|
"documentation": "https://www.home-assistant.io/integrations/nexia",
|
||||||
"config_flow": true
|
"config_flow": true
|
||||||
|
@ -924,7 +924,7 @@ netdisco==2.6.0
|
|||||||
neurio==0.3.1
|
neurio==0.3.1
|
||||||
|
|
||||||
# homeassistant.components.nexia
|
# homeassistant.components.nexia
|
||||||
nexia==0.9.1
|
nexia==0.9.2
|
||||||
|
|
||||||
# homeassistant.components.nextcloud
|
# homeassistant.components.nextcloud
|
||||||
nextcloudmonitor==1.1.0
|
nextcloudmonitor==1.1.0
|
||||||
|
@ -359,7 +359,7 @@ nessclient==0.9.15
|
|||||||
netdisco==2.6.0
|
netdisco==2.6.0
|
||||||
|
|
||||||
# homeassistant.components.nexia
|
# homeassistant.components.nexia
|
||||||
nexia==0.9.1
|
nexia==0.9.2
|
||||||
|
|
||||||
# homeassistant.components.nsw_fuel_station
|
# homeassistant.components.nsw_fuel_station
|
||||||
nsw-fuel-api-client==1.0.10
|
nsw-fuel-api-client==1.0.10
|
||||||
|
Loading…
x
Reference in New Issue
Block a user