1 """Support for Ecobee Thermostats."""
3 from __future__
import annotations
8 import voluptuous
as vol
11 ATTR_TARGET_TEMP_HIGH,
42 from .
import EcobeeData
46 ATTR_AVAILABLE_SENSORS,
52 from .util
import ecobee_date, ecobee_time, is_indefinite_hold
54 ATTR_COOL_TEMP =
"cool_temp"
55 ATTR_END_DATE =
"end_date"
56 ATTR_END_TIME =
"end_time"
57 ATTR_FAN_MIN_ON_TIME =
"fan_min_on_time"
58 ATTR_FAN_MODE =
"fan_mode"
59 ATTR_HEAT_TEMP =
"heat_temp"
60 ATTR_RESUME_ALL =
"resume_all"
61 ATTR_START_DATE =
"start_date"
62 ATTR_START_TIME =
"start_time"
63 ATTR_VACATION_NAME =
"vacation_name"
64 ATTR_DST_ENABLED =
"dst_enabled"
65 ATTR_MIC_ENABLED =
"mic_enabled"
66 ATTR_AUTO_AWAY =
"auto_away"
67 ATTR_FOLLOW_ME =
"follow_me"
68 ATTR_SENSOR_LIST =
"device_ids"
69 ATTR_PRESET_MODE =
"preset_mode"
71 DEFAULT_RESUME_ALL =
False
72 PRESET_AWAY_INDEFINITELY =
"away_indefinitely"
73 PRESET_TEMPERATURE =
"temp"
74 PRESET_VACATION =
"vacation"
75 PRESET_HOLD_NEXT_TRANSITION =
"next_transition"
76 PRESET_HOLD_INDEFINITE =
"indefinite"
77 HAS_HEAT_PUMP =
"hasHeatPump"
79 DEFAULT_MIN_HUMIDITY = 15
80 DEFAULT_MAX_HUMIDITY = 50
81 HUMIDIFIER_MANUAL_MODE =
"manual"
84 ECOBEE_HVAC_TO_HASS = collections.OrderedDict(
86 (
"heat", HVACMode.HEAT),
87 (
"cool", HVACMode.COOL),
88 (
"auto", HVACMode.HEAT_COOL),
89 (
"off", HVACMode.OFF),
90 (ECOBEE_AUX_HEAT_ONLY, HVACMode.HEAT),
94 HASS_TO_ECOBEE_HVAC = {
95 v: k
for k, v
in ECOBEE_HVAC_TO_HASS.items()
if k != ECOBEE_AUX_HEAT_ONLY
98 ECOBEE_HVAC_ACTION_TO_HASS = {
100 "heatPump": HVACAction.HEATING,
101 "heatPump2": HVACAction.HEATING,
102 "heatPump3": HVACAction.HEATING,
103 "compCool1": HVACAction.COOLING,
104 "compCool2": HVACAction.COOLING,
105 "auxHeat1": HVACAction.HEATING,
106 "auxHeat2": HVACAction.HEATING,
107 "auxHeat3": HVACAction.HEATING,
108 "fan": HVACAction.FAN,
110 "dehumidifier": HVACAction.DRYING,
111 "ventilator": HVACAction.FAN,
112 "economizer": HVACAction.FAN,
113 "compHotWater":
None,
115 "compWaterHeater":
None,
118 ECOBEE_TO_HASS_PRESET = {
121 "Sleep": PRESET_SLEEP,
123 HASS_TO_ECOBEE_PRESET = {v: k
for k, v
in ECOBEE_TO_HASS_PRESET.items()}
125 PRESET_TO_ECOBEE_HOLD = {
126 PRESET_HOLD_NEXT_TRANSITION:
"nextTransition",
127 PRESET_HOLD_INDEFINITE:
"indefinite",
130 SERVICE_CREATE_VACATION =
"create_vacation"
131 SERVICE_DELETE_VACATION =
"delete_vacation"
132 SERVICE_RESUME_PROGRAM =
"resume_program"
133 SERVICE_SET_FAN_MIN_ON_TIME =
"set_fan_min_on_time"
134 SERVICE_SET_DST_MODE =
"set_dst_mode"
135 SERVICE_SET_MIC_MODE =
"set_mic_mode"
136 SERVICE_SET_OCCUPANCY_MODES =
"set_occupancy_modes"
137 SERVICE_SET_SENSORS_USED_IN_CLIMATE =
"set_sensors_used_in_climate"
139 DTGROUP_START_INCLUSIVE_MSG = (
140 f
"{ATTR_START_DATE} and {ATTR_START_TIME} must be specified together"
143 DTGROUP_END_INCLUSIVE_MSG = (
144 f
"{ATTR_END_DATE} and {ATTR_END_TIME} must be specified together"
147 CREATE_VACATION_SCHEMA = vol.Schema(
149 vol.Required(ATTR_ENTITY_ID): cv.entity_id,
150 vol.Required(ATTR_VACATION_NAME): vol.All(cv.string, vol.Length(max=12)),
151 vol.Required(ATTR_COOL_TEMP): vol.Coerce(float),
152 vol.Required(ATTR_HEAT_TEMP): vol.Coerce(float),
154 ATTR_START_DATE,
"dtgroup_start", msg=DTGROUP_START_INCLUSIVE_MSG
157 ATTR_START_TIME,
"dtgroup_start", msg=DTGROUP_START_INCLUSIVE_MSG
160 ATTR_END_DATE,
"dtgroup_end", msg=DTGROUP_END_INCLUSIVE_MSG
163 ATTR_END_TIME,
"dtgroup_end", msg=DTGROUP_END_INCLUSIVE_MSG
165 vol.Optional(ATTR_FAN_MODE, default=
"auto"): vol.Any(
"auto",
"on"),
166 vol.Optional(ATTR_FAN_MIN_ON_TIME, default=0): vol.All(
167 int, vol.Range(min=0, max=60)
172 DELETE_VACATION_SCHEMA = vol.Schema(
174 vol.Required(ATTR_ENTITY_ID): cv.entity_id,
175 vol.Required(ATTR_VACATION_NAME): vol.All(cv.string, vol.Length(max=12)),
179 RESUME_PROGRAM_SCHEMA = vol.Schema(
181 vol.Optional(ATTR_ENTITY_ID): cv.entity_ids,
182 vol.Optional(ATTR_RESUME_ALL, default=DEFAULT_RESUME_ALL): cv.boolean,
186 SET_FAN_MIN_ON_TIME_SCHEMA = vol.Schema(
188 vol.Optional(ATTR_ENTITY_ID): cv.entity_ids,
189 vol.Required(ATTR_FAN_MIN_ON_TIME): vol.Coerce(int),
195 ClimateEntityFeature.TARGET_TEMPERATURE
196 | ClimateEntityFeature.PRESET_MODE
197 | ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
198 | ClimateEntityFeature.FAN_MODE
204 config_entry: ConfigEntry,
205 async_add_entities: AddEntitiesCallback,
207 """Set up the ecobee thermostat."""
209 data = hass.data[DOMAIN]
212 for index
in range(len(data.ecobee.thermostats)):
213 thermostat = data.ecobee.get_thermostat(index)
214 if thermostat[
"modelNumber"]
not in ECOBEE_MODEL_TO_NAME:
217 "Model number for ecobee thermostat %s not recognized. "
218 "Please visit this link to open a new issue: "
219 "https://github.com/home-assistant/core/issues "
220 "and include the following information: "
221 "Unrecognized model number: %s"
224 thermostat[
"modelNumber"],
226 entities.append(
Thermostat(data, index, thermostat, hass))
230 platform = entity_platform.async_get_current_platform()
232 def create_vacation_service(service: ServiceCall) ->
None:
233 """Create a vacation on the target thermostat."""
234 entity_id = service.data[ATTR_ENTITY_ID]
236 for thermostat
in entities:
237 if thermostat.entity_id == entity_id:
238 thermostat.create_vacation(service.data)
239 thermostat.schedule_update_ha_state(
True)
242 def delete_vacation_service(service: ServiceCall) ->
None:
243 """Delete a vacation on the target thermostat."""
244 entity_id = service.data[ATTR_ENTITY_ID]
245 vacation_name = service.data[ATTR_VACATION_NAME]
247 for thermostat
in entities:
248 if thermostat.entity_id == entity_id:
249 thermostat.delete_vacation(vacation_name)
250 thermostat.schedule_update_ha_state(
True)
253 def fan_min_on_time_set_service(service: ServiceCall) ->
None:
254 """Set the minimum fan on time on the target thermostats."""
255 entity_id = service.data.get(ATTR_ENTITY_ID)
256 fan_min_on_time = service.data[ATTR_FAN_MIN_ON_TIME]
259 target_thermostats = [
260 entity
for entity
in entities
if entity.entity_id
in entity_id
263 target_thermostats = entities
265 for thermostat
in target_thermostats:
266 thermostat.set_fan_min_on_time(
str(fan_min_on_time))
268 thermostat.schedule_update_ha_state(
True)
270 def resume_program_set_service(service: ServiceCall) ->
None:
271 """Resume the program on the target thermostats."""
272 entity_id = service.data.get(ATTR_ENTITY_ID)
273 resume_all = service.data.get(ATTR_RESUME_ALL)
276 target_thermostats = [
277 entity
for entity
in entities
if entity.entity_id
in entity_id
280 target_thermostats = entities
282 for thermostat
in target_thermostats:
283 thermostat.resume_program(resume_all)
285 thermostat.schedule_update_ha_state(
True)
287 hass.services.async_register(
289 SERVICE_CREATE_VACATION,
290 create_vacation_service,
291 schema=CREATE_VACATION_SCHEMA,
294 hass.services.async_register(
296 SERVICE_DELETE_VACATION,
297 delete_vacation_service,
298 schema=DELETE_VACATION_SCHEMA,
301 hass.services.async_register(
303 SERVICE_SET_FAN_MIN_ON_TIME,
304 fan_min_on_time_set_service,
305 schema=SET_FAN_MIN_ON_TIME_SCHEMA,
308 hass.services.async_register(
310 SERVICE_RESUME_PROGRAM,
311 resume_program_set_service,
312 schema=RESUME_PROGRAM_SCHEMA,
315 platform.async_register_entity_service(
316 SERVICE_SET_DST_MODE,
317 {vol.Required(ATTR_DST_ENABLED): cv.boolean},
321 platform.async_register_entity_service(
322 SERVICE_SET_MIC_MODE,
323 {vol.Required(ATTR_MIC_ENABLED): cv.boolean},
327 platform.async_register_entity_service(
328 SERVICE_SET_OCCUPANCY_MODES,
330 vol.Optional(ATTR_AUTO_AWAY): cv.boolean,
331 vol.Optional(ATTR_FOLLOW_ME): cv.boolean,
333 "set_occupancy_modes",
336 platform.async_register_entity_service(
337 SERVICE_SET_SENSORS_USED_IN_CLIMATE,
339 vol.Optional(ATTR_PRESET_MODE): cv.string,
340 vol.Required(ATTR_SENSOR_LIST): cv.ensure_list,
342 "set_sensors_used_in_climate",
347 """A thermostat class for Ecobee."""
349 _attr_precision = PRECISION_TENTHS
350 _attr_temperature_unit = UnitOfTemperature.FAHRENHEIT
351 _attr_min_humidity = DEFAULT_MIN_HUMIDITY
352 _attr_max_humidity = DEFAULT_MAX_HUMIDITY
353 _attr_fan_modes = [FAN_AUTO, FAN_ON]
355 _attr_has_entity_name =
True
356 _enable_turn_on_off_backwards_compatibility =
False
357 _attr_translation_key =
"ecobee"
362 thermostat_index: int,
366 """Initialize the thermostat."""
377 if self.
settingssettings[
"heatStages"]
or self.
settingssettings[
"hasHeatPump"]:
379 if self.
settingssettings[
"coolStages"]:
386 comfort[
"climateRef"]: comfort[
"name"]
387 for comfort
in self.
thermostatthermostat[
"program"][
"climates"]
392 """Get the latest state from the thermostat."""
404 """Return if device is available."""
405 return self.
thermostatthermostat[
"runtime"][
"connected"]
409 """Return the list of supported features."""
410 supported = SUPPORT_FLAGS
412 supported = supported | ClimateEntityFeature.TARGET_HUMIDITY
415 supported | ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
421 """Return device information for this ecobee thermostat."""
424 model = f
"{ECOBEE_MODEL_TO_NAME[self.thermostat['modelNumber']]} Thermostat"
430 identifiers={(DOMAIN, self.
thermostatthermostat[
"identifier"])},
431 manufacturer=MANUFACTURER,
438 """Return the current temperature."""
439 return self.
thermostatthermostat[
"runtime"][
"actualTemperature"] / 10.0
443 """Return the lower bound temperature we try to reach."""
445 return self.
thermostatthermostat[
"runtime"][
"desiredHeat"] / 10.0
450 """Return the upper bound temperature we try to reach."""
452 return self.
thermostatthermostat[
"runtime"][
"desiredCool"] / 10.0
457 """Set target temperature step to halves."""
458 return PRECISION_HALVES
462 """Return the settings of the thermostat."""
467 """Return true if humidifier connected to thermostat and set to manual/on mode."""
470 and self.
settingssettings.
get(
"humidifierMode") == HUMIDIFIER_MANUAL_MODE
475 """Return the desired humidity set point."""
477 return self.
thermostatthermostat[
"runtime"][
"desiredHumidity"]
482 """Return the temperature we try to reach."""
486 return self.
thermostatthermostat[
"runtime"][
"desiredHeat"] / 10.0
488 return self.
thermostatthermostat[
"runtime"][
"desiredCool"] / 10.0
493 """Return the current fan status."""
494 if "fan" in self.
thermostatthermostat[
"equipmentStatus"]:
500 """Return the fan setting."""
501 return self.
thermostatthermostat[
"runtime"][
"desiredFanMode"]
505 """Return current preset mode."""
508 if not event[
"running"]:
511 if event[
"type"] ==
"hold":
513 event[
"startDate"], event[
"endDate"]
515 return PRESET_AWAY_INDEFINITELY
518 return ECOBEE_TO_HASS_PRESET.get(name, name)
521 return PRESET_TEMPERATURE
522 if event[
"type"].startswith(
"auto"):
524 return event[
"type"][4:].lower()
525 if event[
"type"] ==
"vacation":
526 self.
vacationvacation = event[
"name"]
527 return PRESET_VACATION
530 self.
thermostatthermostat[
"program"][
"currentClimateRef"]
532 return ECOBEE_TO_HASS_PRESET.get(name, name)
538 """Return current operation."""
539 return ECOBEE_HVAC_TO_HASS[self.
settingssettings[
"hvacMode"]]
543 """Return the current humidity."""
545 return int(self.
thermostatthermostat[
"runtime"][
"actualHumidity"])
551 """Return current HVAC action.
553 Ecobee returns a CSV string with different equipment that is active.
554 We are prioritizing any heating/cooling equipment, otherwise look at
555 drying/fanning. Idle if nothing going on.
557 We are unable to map all actions to HA equivalents.
559 if self.
thermostatthermostat[
"equipmentStatus"] ==
"":
560 return HVACAction.IDLE
563 ECOBEE_HVAC_ACTION_TO_HASS[status]
564 for status
in self.
thermostatthermostat[
"equipmentStatus"].split(
",")
565 if ECOBEE_HVAC_ACTION_TO_HASS[status]
is not None
574 if action
in actions:
577 return HVACAction.IDLE
579 _unrecorded_attributes = frozenset({ATTR_AVAILABLE_SENSORS, ATTR_ACTIVE_SENSORS})
583 """Return device specific state attributes."""
584 status = self.
thermostatthermostat[
"equipmentStatus"]
588 self.
thermostatthermostat[
"program"][
"currentClimateRef"]
590 "equipment_running": status,
591 "fan_min_on_time": self.
settingssettings[
"fanMinOnTime"],
598 """Return the remote sensor names of the thermostat."""
599 sensors_info = self.
thermostatthermostat.
get(
"remoteSensors", [])
600 return [sensor[
"name"]
for sensor
in sensors_info
if sensor.get(
"name")]
604 """Return the remote sensor device name_by_user or name for the thermostat."""
607 f
'{item["name_by_user"]} ({item["id"]})'
614 """Return the remote sensor device id and name_by_user for the thermostat."""
615 sensors_info = self.
thermostatthermostat.
get(
"remoteSensors", [])
616 device_registry = dr.async_get(self.
_hass_hass)
621 "name_by_user": device.name_by_user
622 if device.name_by_user
625 for device
in device_registry.devices.values()
626 for sensor_info
in sensors_info
627 if device.name == sensor_info[
"name"]
632 """Return the currently active/participating sensors."""
641 """Return the currently active/participating sensor devices."""
649 """Activate a preset."""
650 preset_mode = HASS_TO_ECOBEE_PRESET.get(preset_mode, preset_mode)
661 if preset_mode == PRESET_AWAY_INDEFINITELY:
662 self.
datadata.ecobee.set_climate_hold(
666 elif preset_mode == PRESET_TEMPERATURE:
669 elif preset_mode
in (PRESET_HOLD_NEXT_TRANSITION, PRESET_HOLD_INDEFINITE):
670 self.
datadata.ecobee.set_climate_hold(
672 PRESET_TO_ECOBEE_HOLD[preset_mode],
677 elif preset_mode == PRESET_NONE:
682 if name == preset_mode:
683 preset_mode = climate_ref
686 _LOGGER.warning(
"Received unknown preset mode: %s", preset_mode)
688 self.
datadata.ecobee.set_climate_hold(
697 """Return available preset modes."""
701 ECOBEE_TO_HASS_PRESET.get(name, name)
703 ] + [PRESET_AWAY_INDEFINITELY]
707 """Return ecobee API comfort settings."""
709 comfort[
"climateRef"]: comfort[
"name"]
710 for comfort
in self.
thermostatthermostat[
"program"][
"climates"]
714 """Set temperature hold in auto mode."""
715 if cool_temp
is not None:
716 cool_temp_setpoint = cool_temp
718 cool_temp_setpoint = self.
thermostatthermostat[
"runtime"][
"desiredCool"] / 10.0
720 if heat_temp
is not None:
721 heat_temp_setpoint = heat_temp
723 heat_temp_setpoint = self.
thermostatthermostat[
"runtime"][
"desiredCool"] / 10.0
725 self.
datadata.ecobee.set_hold_temp(
733 "Setting ecobee hold_temp to: heat=%s, is=%s, cool=%s, is=%s",
735 isinstance(heat_temp, (int, float)),
737 isinstance(cool_temp, (int, float)),
743 """Set the fan mode. Valid values are "on" or "auto"."""
744 if fan_mode.lower()
not in (FAN_ON, FAN_AUTO):
745 error =
"Invalid fan_mode value: Valid values are 'on' or 'auto'"
749 self.
datadata.ecobee.set_fan_mode(
756 _LOGGER.debug(
"Setting fan mode to: %s", fan_mode)
759 """Set temperature hold in modes other than auto.
761 Ecobee API: It is good practice to set the heat and cool hold
762 temperatures to be the same, if the thermostat is in either heat, cool,
763 auxHeatOnly, or off mode. If the thermostat is in auto mode, an
764 additional rule is required. The cool hold temperature must be greater
765 than the heat hold temperature by at least the amount in the
766 heatCoolMinDelta property.
767 https://www.ecobee.com/home/developer/api/examples/ex5.shtml
773 delta = self.
settingssettings[
"heatCoolMinDelta"] / 10.0
774 heat_temp = temp - delta
775 cool_temp = temp + delta
779 """Set new target temperature."""
780 low_temp = kwargs.get(ATTR_TARGET_TEMP_LOW)
781 high_temp = kwargs.get(ATTR_TARGET_TEMP_HIGH)
782 temp = kwargs.get(ATTR_TEMPERATURE)
785 low_temp
is not None or high_temp
is not None
788 elif temp
is not None:
791 _LOGGER.error(
"Missing valid arguments for set_temperature in %s", kwargs)
794 """Set the humidity level."""
795 if not (0 <= humidity <= 100):
797 f
"Invalid set_humidity value (must be in range 0-100): {humidity}"
804 """Set HVAC mode (auto, auxHeatOnly, cool, heat, off)."""
805 ecobee_value = HASS_TO_ECOBEE_HVAC.get(hvac_mode)
806 if ecobee_value
is None:
807 _LOGGER.error(
"Invalid mode for set_hvac_mode: %s", hvac_mode)
813 """Set the minimum fan on time."""
814 self.
datadata.ecobee.set_fan_min_on_time(self.
thermostat_indexthermostat_index, fan_min_on_time)
818 """Resume the thermostat schedule program."""
819 self.
datadata.ecobee.resume_program(
825 self, device_ids: list[str], preset_mode: str |
None =
None
827 """Set the sensors used on a climate for a thermostat."""
828 if preset_mode
is None:
832 elif preset_mode
not in self.
_preset_modes_preset_modes.values():
835 translation_domain=DOMAIN,
836 translation_key=
"invalid_preset",
837 translation_placeholders={
838 "options":
", ".join(self.
_preset_modes_preset_modes.values())
843 device_registry = dr.async_get(self.
hasshass)
844 sensor_names: list[str] = []
845 sensor_ids: list[str] = []
846 for device_id
in device_ids:
847 device = device_registry.async_get(device_id)
848 if device
and device.name:
849 r_sensors = self.
thermostatthermostat.
get(
"remoteSensors", [])
850 ecobee_identifier = next(
853 for identifier
in device.identifiers
854 if identifier[0] ==
"ecobee"
858 if ecobee_identifier:
859 code = ecobee_identifier[1]
860 for r_sensor
in r_sensors:
862 len(code) == 4
and r_sensor.get(
"code") == code
864 len(code) != 4
and r_sensor.get(
"type") ==
"thermostat"
866 sensor_ids.append(r_sensor.get(
"id"))
867 sensor_names.append(device.name)
870 if not set(sensor_names).issubset(set(self.
_sensors_sensors))
or not sensor_names:
872 translation_domain=DOMAIN,
873 translation_key=
"invalid_sensor",
874 translation_placeholders={
875 "options":
", ".join(
877 f
'{item["name_by_user"]} ({item["id"]})'
885 if len(device_ids) != len(sensor_ids):
887 translation_domain=DOMAIN, translation_key=
"sensor_lookup_failed"
892 if set(sensor_names) == set(current_sensors_in_climate):
894 "This action would not be an update, current sensors on climate (%s) are: %s",
896 ", ".join(current_sensors_in_climate),
901 "Setting sensors %s to be used on thermostat %s for program %s",
906 self.
datadata.ecobee.update_climate_sensors(
912 """Return current sensors used in climate."""
913 climates = self.
thermostatthermostat[
"program"][
"climates"]
914 for climate
in climates:
915 if climate.get(
"name") == preset_mode:
916 return [sensor[
"name"]
for sensor
in climate[
"sensors"]]
921 """Return current sensor device name_by_user or name used in climate."""
922 device_registry = dr.async_get(self.
_hass_hass)
926 device.name_by_user
if device.name_by_user
else device.name
927 for device
in device_registry.devices.values()
928 for sensor_name
in sensor_names
929 if device.name == sensor_name
934 """Return user preference setting for hold time."""
939 device_preference = self.
settingssettings[
"holdAction"]
943 "useEndTime2hour":
"holdHours",
944 "useEndTime4hour":
"holdHours",
945 "indefinite":
"indefinite",
947 return hold_pref_map.get(device_preference,
"nextTransition")
950 """Return user preference setting for hold duration in hours."""
955 device_preference = self.
settingssettings[
"holdAction"]
957 "useEndTime2hour": 2,
958 "useEndTime4hour": 4,
960 return hold_hours_map.get(device_preference)
963 """Create a vacation with user-specified parameters."""
964 vacation_name = service_data[ATTR_VACATION_NAME]
965 cool_temp = TemperatureConverter.convert(
966 service_data[ATTR_COOL_TEMP],
967 self.
hasshass.config.units.temperature_unit,
968 UnitOfTemperature.FAHRENHEIT,
970 heat_temp = TemperatureConverter.convert(
971 service_data[ATTR_HEAT_TEMP],
972 self.
hasshass.config.units.temperature_unit,
973 UnitOfTemperature.FAHRENHEIT,
975 start_date = service_data.get(ATTR_START_DATE)
976 start_time = service_data.get(ATTR_START_TIME)
977 end_date = service_data.get(ATTR_END_DATE)
978 end_time = service_data.get(ATTR_END_TIME)
979 fan_mode = service_data[ATTR_FAN_MODE]
980 fan_min_on_time = service_data[ATTR_FAN_MIN_ON_TIME]
985 "start_date": start_date,
986 "start_time": start_time,
987 "end_date": end_date,
988 "end_time": end_time,
989 "fan_mode": fan_mode,
990 "fan_min_on_time": fan_min_on_time,
997 "Creating a vacation on thermostat %s with name %s, cool temp %s, heat"
998 " temp %s, and the following other parameters: %s"
1006 self.
datadata.ecobee.create_vacation(
1007 self.
thermostat_indexthermostat_index, vacation_name, cool_temp, heat_temp, **kwargs
1011 """Delete a vacation with the specified name."""
1013 "Deleting a vacation on thermostat %s with name %s",
1020 """Set the thermostat to the last active HVAC mode."""
1022 "Turning on ecobee thermostat %s in %s mode",
1029 """Enable/disable automatic daylight savings time."""
1033 """Enable/disable Alexa mic (only for Ecobee 4)."""
1037 """Enable/disable Smart Home/Away and Follow Me modes."""
1038 self.
datadata.ecobee.set_occupancy_modes(
None set_hvac_mode(self, HVACMode hvac_mode)
HVACMode|None hvac_mode(self)
list[str]|None preset_modes(self)
float|None current_temperature(self)
list[HVACMode] hvac_modes(self)
str|None preset_mode(self)
None set_preset_mode(self, str preset_mode)
def set_auto_temp_hold(self, heat_temp, cool_temp)
list active_sensor_devices_in_preset_mode(self)
list[str] _sensor_devices_in_preset_mode(self, str|None preset_mode)
def set_mic_mode(self, mic_enabled)
float|None target_temperature(self)
def hold_preference(self)
None set_sensors_used_in_climate(self, list[str] device_ids, str|None preset_mode=None)
str|None preset_mode(self)
list remote_sensor_devices(self)
def resume_program(self, resume_all)
None set_humidity(self, int humidity)
DeviceInfo device_info(self)
int|None current_humidity(self)
def set_occupancy_modes(self, auto_away=None, follow_me=None)
def set_dst_mode(self, dst_enabled)
def set_fan_min_on_time(self, fan_min_on_time)
dict[str, Any] settings(self)
float|None target_temperature_high(self)
def create_vacation(self, service_data)
None __init__(self, EcobeeData data, int thermostat_index, dict thermostat, HomeAssistant hass)
list active_sensors_in_preset_mode(self)
float|None target_temperature_low(self)
_last_hvac_mode_before_aux_heat
dict[str, str] comfort_settings(self)
ClimateEntityFeature supported_features(self)
list[str] _sensors_in_preset_mode(self, str|None preset_mode)
bool has_humidifier_control(self)
def delete_vacation(self, vacation_name)
list[str]|None preset_modes(self)
list remote_sensor_ids_names(self)
int|None target_humidity(self)
def set_temp_hold(self, temp)
dict[str, Any]|None extra_state_attributes(self)
list remote_sensors(self)
float current_temperature(self)
None set_hvac_mode(self, HVACMode hvac_mode)
None set_fan_mode(self, str fan_mode)
float target_temperature_step(self)
None set_temperature(self, **Any kwargs)
DeviceInfo|None device_info(self)
str|UndefinedType|None name(self)
web.Response get(self, web.Request request, str config_key)
None async_setup_entry(HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
bool is_indefinite_hold(str start_date_string, str end_date_string)
IssData update(pyiss.ISS iss)