Remove unused variables in honeywell (#108252)
Remove unused configuration keys
This commit is contained in:
parent
484584084a
commit
2d1c5d84f3
2 changed files with 2 additions and 11 deletions
|
@ -13,9 +13,7 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
|||
from .const import (
|
||||
_LOGGER,
|
||||
CONF_COOL_AWAY_TEMPERATURE,
|
||||
CONF_DEV_ID,
|
||||
CONF_HEAT_AWAY_TEMPERATURE,
|
||||
CONF_LOC_ID,
|
||||
DOMAIN,
|
||||
)
|
||||
|
||||
|
@ -70,15 +68,10 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
|||
"Failed to initialize the Honeywell client: Connection error"
|
||||
) from ex
|
||||
|
||||
loc_id = config_entry.data.get(CONF_LOC_ID)
|
||||
dev_id = config_entry.data.get(CONF_DEV_ID)
|
||||
|
||||
devices = {}
|
||||
for location in client.locations_by_id.values():
|
||||
if not loc_id or location.locationid == loc_id:
|
||||
for device in location.devices_by_id.values():
|
||||
if not dev_id or device.deviceid == dev_id:
|
||||
devices[device.deviceid] = device
|
||||
for device in location.devices_by_id.values():
|
||||
devices[device.deviceid] = device
|
||||
|
||||
if len(devices) == 0:
|
||||
_LOGGER.debug("No devices found")
|
||||
|
|
|
@ -7,7 +7,5 @@ CONF_COOL_AWAY_TEMPERATURE = "away_cool_temperature"
|
|||
CONF_HEAT_AWAY_TEMPERATURE = "away_heat_temperature"
|
||||
DEFAULT_COOL_AWAY_TEMPERATURE = 88
|
||||
DEFAULT_HEAT_AWAY_TEMPERATURE = 61
|
||||
CONF_DEV_ID = "thermostat"
|
||||
CONF_LOC_ID = "location"
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
RETRY = 3
|
||||
|
|
Loading…
Add table
Reference in a new issue