Remove unused variables in honeywell (#108252)

Remove unused configuration keys
This commit is contained in:
mkmer 2024-01-17 21:37:21 -05:00 committed by GitHub
parent 484584084a
commit 2d1c5d84f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 11 deletions

View file

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

View file

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