Ecobee logging cleanup (#51754)
This commit is contained in:
parent
b2aa55cea2
commit
016ba39dfb
6 changed files with 38 additions and 50 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue