1 """Base classes shared among Ecobee entities."""
3 from __future__
import annotations
11 from .
import EcobeeData
12 from .const
import DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER
14 _LOGGER = logging.getLogger(__name__)
18 """Base methods for Ecobee entities."""
20 def __init__(self, data: EcobeeData, thermostat_index: int) ->
None:
21 """Initiate base methods for Ecobee entities."""
27 identifiers={(DOMAIN, thermostat[
"identifier"])},
28 manufacturer=MANUFACTURER,
29 model=ECOBEE_MODEL_TO_NAME.get(thermostat[
"modelNumber"]),
30 name=thermostat[
"name"],
35 """Return the thermostat data for the entity."""
40 """Return if device is available."""
41 return self.
thermostatthermostat[
"runtime"][
"connected"]
None __init__(self, EcobeeData data, int thermostat_index)
dict[str, Any] thermostat(self)