Esempio n. 1
0
 def _current_mode_setpoint_enums(
         self) -> List[Optional[ThermostatSetpointType]]:
     """Return the list of enums that are relevant to the current thermostat mode."""
     if self._current_mode is None:
         # Thermostat(valve) with no support for setting a mode is considered heating-only
         return [ThermostatSetpointType.HEATING]
     return THERMOSTAT_MODE_SETPOINT_MAP.get(int(self._current_mode.value),
                                             [])  # type: ignore
Esempio n. 2
0
 def _current_mode_setpoint_enums(self) -> List[Optional[ThermostatSetpointType]]:
     """Return the list of enums that are relevant to the current thermostat mode."""
     return THERMOSTAT_MODE_SETPOINT_MAP.get(int(self._current_mode.value), [])  # type: ignore