Add the Trane brand to nexia (#52805)
parent
a810c1ff08
commit
0f6a0f6bcd
|
@ -1,7 +1,7 @@
|
|||
"""Config flow for Nexia integration."""
|
||||
import logging
|
||||
|
||||
from nexia.const import BRAND_ASAIR, BRAND_NEXIA
|
||||
from nexia.const import BRAND_ASAIR, BRAND_NEXIA, BRAND_TRANE
|
||||
from nexia.home import NexiaHome
|
||||
from requests.exceptions import ConnectTimeout, HTTPError
|
||||
import voluptuous as vol
|
||||
|
@ -9,7 +9,13 @@ import voluptuous as vol
|
|||
from homeassistant import config_entries, core, exceptions
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||
|
||||
from .const import BRAND_ASAIR_NAME, BRAND_NEXIA_NAME, CONF_BRAND, DOMAIN
|
||||
from .const import (
|
||||
BRAND_ASAIR_NAME,
|
||||
BRAND_NEXIA_NAME,
|
||||
BRAND_TRANE_NAME,
|
||||
CONF_BRAND,
|
||||
DOMAIN,
|
||||
)
|
||||
from .util import is_invalid_auth_code
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -19,7 +25,11 @@ DATA_SCHEMA = vol.Schema(
|
|||
vol.Required(CONF_USERNAME): str,
|
||||
vol.Required(CONF_PASSWORD): str,
|
||||
vol.Required(CONF_BRAND, default=BRAND_NEXIA): vol.In(
|
||||
{BRAND_NEXIA: BRAND_NEXIA_NAME, BRAND_ASAIR: BRAND_ASAIR_NAME}
|
||||
{
|
||||
BRAND_NEXIA: BRAND_NEXIA_NAME,
|
||||
BRAND_ASAIR: BRAND_ASAIR_NAME,
|
||||
BRAND_TRANE: BRAND_TRANE_NAME,
|
||||
}
|
||||
),
|
||||
}
|
||||
)
|
||||
|
@ -31,7 +41,9 @@ 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")
|
||||
state_file = hass.config.path(
|
||||
f"{data[CONF_BRAND]}_config_{data[CONF_USERNAME]}.conf"
|
||||
)
|
||||
try:
|
||||
nexia_home = NexiaHome(
|
||||
username=data[CONF_USERNAME],
|
||||
|
|
|
@ -33,4 +33,5 @@ SIGNAL_ZONE_UPDATE = "NEXIA_CLIMATE_ZONE_UPDATE"
|
|||
SIGNAL_THERMOSTAT_UPDATE = "NEXIA_CLIMATE_THERMOSTAT_UPDATE"
|
||||
|
||||
BRAND_NEXIA_NAME = "Nexia"
|
||||
BRAND_ASAIR_NAME = "American Standard"
|
||||
BRAND_ASAIR_NAME = "American Standard Home"
|
||||
BRAND_TRANE_NAME = "Trane Home"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"domain": "nexia",
|
||||
"name": "Nexia/American Standard",
|
||||
"requirements": ["nexia==0.9.7"],
|
||||
"name": "Nexia/American Standard/Trane",
|
||||
"requirements": ["nexia==0.9.9"],
|
||||
"codeowners": ["@bdraco"],
|
||||
"documentation": "https://www.home-assistant.io/integrations/nexia",
|
||||
"config_flow": true,
|
||||
|
|
|
@ -1018,7 +1018,7 @@ nettigo-air-monitor==1.0.0
|
|||
neurio==0.3.1
|
||||
|
||||
# homeassistant.components.nexia
|
||||
nexia==0.9.7
|
||||
nexia==0.9.9
|
||||
|
||||
# homeassistant.components.nextcloud
|
||||
nextcloudmonitor==1.1.0
|
||||
|
|
|
@ -572,7 +572,7 @@ netdisco==2.9.0
|
|||
nettigo-air-monitor==1.0.0
|
||||
|
||||
# homeassistant.components.nexia
|
||||
nexia==0.9.7
|
||||
nexia==0.9.9
|
||||
|
||||
# homeassistant.components.notify_events
|
||||
notify-events==1.0.4
|
||||
|
|
Loading…
Reference in New Issue