Ecobee logging cleanup (#51754)

This commit is contained in:
Brent Petit 2021-06-17 03:59:13 -05:00 committed by GitHub
parent b2aa55cea2
commit 016ba39dfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 38 additions and 50 deletions

View file

@ -4,7 +4,7 @@ from homeassistant.components.binary_sensor import (
BinarySensorEntity,
)
from .const import _LOGGER, DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER
from .const import DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER
async def async_setup_entry(hass, config_entry, async_add_entities):
@ -67,17 +67,11 @@ class EcobeeBinarySensor(BinarySensorEntity):
f"{ECOBEE_MODEL_TO_NAME[thermostat['modelNumber']]} Thermostat"
)
except KeyError:
_LOGGER.error(
"Model number for ecobee thermostat %s not recognized. "
"Please visit this link and provide the following information: "
"https://github.com/home-assistant/core/issues/27172 "
"Unrecognized model number: %s",
thermostat["name"],
thermostat["modelNumber"],
)
# Ecobee model is not in our list
model = None
break
if identifier is not None and model is not None:
if identifier is not None:
return {
"identifiers": {(DOMAIN, identifier)},
"name": self.sensor_name,