mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Remove unused variables in honeywell (#108252)
Remove unused configuration keys
This commit is contained in:
parent
484584084a
commit
2d1c5d84f3
@ -13,9 +13,7 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
|||||||
from .const import (
|
from .const import (
|
||||||
_LOGGER,
|
_LOGGER,
|
||||||
CONF_COOL_AWAY_TEMPERATURE,
|
CONF_COOL_AWAY_TEMPERATURE,
|
||||||
CONF_DEV_ID,
|
|
||||||
CONF_HEAT_AWAY_TEMPERATURE,
|
CONF_HEAT_AWAY_TEMPERATURE,
|
||||||
CONF_LOC_ID,
|
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -70,15 +68,10 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
|||||||
"Failed to initialize the Honeywell client: Connection error"
|
"Failed to initialize the Honeywell client: Connection error"
|
||||||
) from ex
|
) from ex
|
||||||
|
|
||||||
loc_id = config_entry.data.get(CONF_LOC_ID)
|
|
||||||
dev_id = config_entry.data.get(CONF_DEV_ID)
|
|
||||||
|
|
||||||
devices = {}
|
devices = {}
|
||||||
for location in client.locations_by_id.values():
|
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():
|
||||||
for device in location.devices_by_id.values():
|
devices[device.deviceid] = device
|
||||||
if not dev_id or device.deviceid == dev_id:
|
|
||||||
devices[device.deviceid] = device
|
|
||||||
|
|
||||||
if len(devices) == 0:
|
if len(devices) == 0:
|
||||||
_LOGGER.debug("No devices found")
|
_LOGGER.debug("No devices found")
|
||||||
|
@ -7,7 +7,5 @@ CONF_COOL_AWAY_TEMPERATURE = "away_cool_temperature"
|
|||||||
CONF_HEAT_AWAY_TEMPERATURE = "away_heat_temperature"
|
CONF_HEAT_AWAY_TEMPERATURE = "away_heat_temperature"
|
||||||
DEFAULT_COOL_AWAY_TEMPERATURE = 88
|
DEFAULT_COOL_AWAY_TEMPERATURE = 88
|
||||||
DEFAULT_HEAT_AWAY_TEMPERATURE = 61
|
DEFAULT_HEAT_AWAY_TEMPERATURE = 61
|
||||||
CONF_DEV_ID = "thermostat"
|
|
||||||
CONF_LOC_ID = "location"
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
RETRY = 3
|
RETRY = 3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user