Skip to content

VeSync Thermostats↲

pyvesync.devices.vesyncthermostat ↲

Thermostat device classes.

pyvesync.devices.vesyncthermostat.VeSyncAuraThermostat ↲

Bases: BypassV2Mixin, VeSyncThermostat

VeSync Aura Thermostat.

Source code in src/pyvesync/devices/vesyncthermostat.py
class VeSyncAuraThermostat(BypassV2Mixin, VeSyncThermostat):
    """VeSync Aura Thermostat."""

    def __init__(
        self,
        details: ResponseDeviceDetailsModel,
        manager: VeSync,
        feature_map: ThermostatMap,
    ) -> None:
        """Initialize VeSync Aura Thermostat."""
        super().__init__(details, manager, feature_map)

    def _process_details(self, details: ResultThermostatDetails) -> None:
        """Internal method to process thermostat details."""
        if details.supportMode is not None:
            self.supported_work_modes = [
                ThermostatWorkModes(mode) for mode in details.supportMode
            ]
        self.state.work_mode = ThermostatConst.WorkMode(details.workMode)
        self.state.work_status = ThermostatConst.WorkStatus(details.workStatus)
        self.state.fan_status = ThermostatConst.FanStatus(details.fanStatus)
        self.state.fan_mode = ThermostatConst.FanMode(details.fanMode)
        self.state.temperature_unit = details.tempUnit
        self.state.temperature = details.temperature
        self.state.humidity = details.humidity
        self.state.heat_to_temp = details.heatToTemp
        self.state.cool_to_temp = details.coolToTemp
        self.state.deadband = details.deadband
        self.state.lock_status = details.lockStatus
        self.state.schedule_or_hold = ThermostatConst.ScheduleOrHoldOption(
            details.scheduleOrHold
        )
        self.state.hold_end_time = details.holdEndTime
        self.state.hold_option = ThermostatConst.HoldOption(details.holdOption)
        self.state.eco_type = ThermostatConst.EcoType(details.ecoType)
        self.state.alert_status = details.alertStatus
        self.state.routine_running_id = details.routineRunningId
        self.state.routines = details.routines

    async def get_details(self) -> None:
        """Get the details of the thermostat."""
        r_dict = await self.call_bypassv2_api('getTsStatus')
        r_model = process_bypassv2_result(
            self, _LOGGER, 'get_details', r_dict, ResultThermostatDetails
        )
        if r_model is None:
            return
        self._process_details(r_model)

    async def get_configuration(self) -> None:
        """Get configuration or 'minor details'."""
        r_dict = await self.call_bypassv2_api('getTsMinorInfo')
        result = process_bypassv2_result(
            self, _LOGGER, 'get_configuration', r_dict, ThermostatMinorDetails
        )
        if result is None:
            return
        self.state.configuration = result

    async def _set_hold_status_api(
        self,
        key: str | None = None,
        temp: float | None = None,
        hold_status: ThermostatHoldStatus | None = None,
    ) -> bool:
        """Internal function to call the 'setHoldStatus' API."""
        if key is None and temp is None and hold_status is None:
            _LOGGER.debug('At least one of key, temp, or hold_status must be provided.')
            return False
        payload_data: dict[str, str | float] = {}
        if hold_status is not None and hold_status.value == ThermostatHoldStatus.CANCEL:
            payload_data = {'holdStatus': ThermostatHoldStatus.CANCEL}
        else:
            if key is None or temp is None:
                _LOGGER.debug('Either key or temp must be provided.')
                return False
            payload_data = {key: temp, 'holdStatus': ThermostatHoldStatus.SET.value}
        r_dict = await self.call_bypassv2_api('setHoldStatus', data=payload_data)
        result = Helpers.process_dev_response(_LOGGER, 'setHoldStatus', self, r_dict)
        return bool(result)

    async def set_temp_point(self, temperature: float) -> bool:
        return await self._set_hold_status_api('setTempPoint', temperature)

    async def cancel_hold(self) -> bool:
        """Cancel hold."""
        return await self._set_hold_status_api(hold_status=ThermostatHoldStatus.CANCEL)

    async def set_cool_to_temp(self, temperature: float) -> bool:
        """Set cool to temperature."""
        return await self._set_hold_status_api('coolToTemp', temperature)

    async def set_heat_to_temp(self, temperature: float) -> bool:
        """Set heat to temperature."""
        return await self._set_hold_status_api('heatToTemp', temperature)

    async def set_mode(self, mode: ThermostatWorkModes) -> bool:
        """Set thermostat mode."""
        if mode not in self.supported_work_modes:
            _LOGGER.debug('Invalid mode: %s', mode)
            return False
        payload_data = {'tsMode': mode}
        r_dict = await self.call_bypassv2_api('setTsMode', data=payload_data)
        result = Helpers.process_dev_response(_LOGGER, 'setTsMode', self, r_dict)
        return bool(result)

    async def set_fan_mode(self, mode: ThermostatFanModes) -> bool:
        """Set thermostat fan mode."""
        if mode not in self.fan_modes:
            _LOGGER.debug('Invalid fan mode: %s', mode)
            return False
        payload_data = {'fanMode': mode.value}
        r_dict = await self.call_bypassv2_api('setFanMode', data=payload_data)
        result = Helpers.process_dev_response(_LOGGER, 'setFanMode', self, r_dict)
        return bool(result)

    async def toggle_lock(self, toggle: bool, pin: int | str | None = None) -> bool:
        """Toggle thermostat lock status."""
        if toggle is True and pin is None:
            _LOGGER.debug('PIN required to lock the thermostat.')
            return False
        payload_data: dict[str, bool | str] = {'lockStatus': toggle}
        if toggle is True:
            pin_int = int(pin) if isinstance(pin, str) else pin
            if not Validators.validate_range(pin_int, 0, 9999):
                _LOGGER.debug('PIN must be between 0 and 9999.')
                return False
            payload_data['lockPinCode'] = f'{pin_int:0>4}'
        r_dict = await self.call_bypassv2_api('setLockStatus', data=payload_data)
        result = Helpers.process_dev_response(_LOGGER, 'toggle_lock_status', self, r_dict)
        return bool(result)

    async def set_eco_type(self, eco_type: ThermostatEcoTypes) -> bool:
        """Set thermostat eco type."""
        if eco_type not in self.eco_types:
            _LOGGER.debug('Invalid eco type: %s', eco_type)
            return False
        payload_data = {'ecoType': eco_type.value}
        r_dict = await self.call_bypassv2_api('setECOType', data=payload_data)
        result = Helpers.process_dev_response(_LOGGER, 'setEcoType', self, r_dict)
        return bool(result)

get_details async ↲

get_details() -> None

Inherited From VeSyncBaseDevice

Get the details of the thermostat.

Source code in src/pyvesync/devices/vesyncthermostat.py
async def get_details(self) -> None:
    """Get the details of the thermostat."""
    r_dict = await self.call_bypassv2_api('getTsStatus')
    r_model = process_bypassv2_result(
        self, _LOGGER, 'get_details', r_dict, ResultThermostatDetails
    )
    if r_model is None:
        return
    self._process_details(r_model)

get_configuration async ↲

get_configuration() -> None

Inherited From VeSyncThermostat

Get configuration or 'minor details'.

Source code in src/pyvesync/devices/vesyncthermostat.py
async def get_configuration(self) -> None:
    """Get configuration or 'minor details'."""
    r_dict = await self.call_bypassv2_api('getTsMinorInfo')
    result = process_bypassv2_result(
        self, _LOGGER, 'get_configuration', r_dict, ThermostatMinorDetails
    )
    if result is None:
        return
    self.state.configuration = result

set_temp_point async ↲

set_temp_point(temperature: float) -> bool

Inherited From VeSyncThermostat

Set the temperature point.

Source code in src/pyvesync/devices/vesyncthermostat.py
async def set_temp_point(self, temperature: float) -> bool:
    return await self._set_hold_status_api('setTempPoint', temperature)

cancel_hold async ↲

cancel_hold() -> bool

Inherited From VeSyncThermostat

Cancel hold.

Source code in src/pyvesync/devices/vesyncthermostat.py
async def cancel_hold(self) -> bool:
    """Cancel hold."""
    return await self._set_hold_status_api(hold_status=ThermostatHoldStatus.CANCEL)

set_cool_to_temp async ↲

set_cool_to_temp(temperature: float) -> bool

Inherited From VeSyncThermostat

Set cool to temperature.

Source code in src/pyvesync/devices/vesyncthermostat.py
async def set_cool_to_temp(self, temperature: float) -> bool:
    """Set cool to temperature."""
    return await self._set_hold_status_api('coolToTemp', temperature)

set_heat_to_temp async ↲

set_heat_to_temp(temperature: float) -> bool

Inherited From VeSyncThermostat

Set heat to temperature.

Source code in src/pyvesync/devices/vesyncthermostat.py
async def set_heat_to_temp(self, temperature: float) -> bool:
    """Set heat to temperature."""
    return await self._set_hold_status_api('heatToTemp', temperature)

set_mode async ↲

set_mode(mode: ThermostatWorkModes) -> bool

Inherited From VeSyncThermostat

Set thermostat mode.

Source code in src/pyvesync/devices/vesyncthermostat.py
async def set_mode(self, mode: ThermostatWorkModes) -> bool:
    """Set thermostat mode."""
    if mode not in self.supported_work_modes:
        _LOGGER.debug('Invalid mode: %s', mode)
        return False
    payload_data = {'tsMode': mode}
    r_dict = await self.call_bypassv2_api('setTsMode', data=payload_data)
    result = Helpers.process_dev_response(_LOGGER, 'setTsMode', self, r_dict)
    return bool(result)

set_fan_mode async ↲

set_fan_mode(mode: ThermostatFanModes) -> bool

Inherited From VeSyncThermostat

Set thermostat fan mode.

Source code in src/pyvesync/devices/vesyncthermostat.py
async def set_fan_mode(self, mode: ThermostatFanModes) -> bool:
    """Set thermostat fan mode."""
    if mode not in self.fan_modes:
        _LOGGER.debug('Invalid fan mode: %s', mode)
        return False
    payload_data = {'fanMode': mode.value}
    r_dict = await self.call_bypassv2_api('setFanMode', data=payload_data)
    result = Helpers.process_dev_response(_LOGGER, 'setFanMode', self, r_dict)
    return bool(result)

toggle_lock async ↲

toggle_lock(
    toggle: bool, pin: int | str | None = None
) -> bool

Inherited From VeSyncThermostat

Toggle thermostat lock status.

Source code in src/pyvesync/devices/vesyncthermostat.py
async def toggle_lock(self, toggle: bool, pin: int | str | None = None) -> bool:
    """Toggle thermostat lock status."""
    if toggle is True and pin is None:
        _LOGGER.debug('PIN required to lock the thermostat.')
        return False
    payload_data: dict[str, bool | str] = {'lockStatus': toggle}
    if toggle is True:
        pin_int = int(pin) if isinstance(pin, str) else pin
        if not Validators.validate_range(pin_int, 0, 9999):
            _LOGGER.debug('PIN must be between 0 and 9999.')
            return False
        payload_data['lockPinCode'] = f'{pin_int:0>4}'
    r_dict = await self.call_bypassv2_api('setLockStatus', data=payload_data)
    result = Helpers.process_dev_response(_LOGGER, 'toggle_lock_status', self, r_dict)
    return bool(result)

set_eco_type async ↲

set_eco_type(eco_type: ThermostatEcoTypes) -> bool

Inherited From VeSyncThermostat

Set thermostat eco type.

Source code in src/pyvesync/devices/vesyncthermostat.py
async def set_eco_type(self, eco_type: ThermostatEcoTypes) -> bool:
    """Set thermostat eco type."""
    if eco_type not in self.eco_types:
        _LOGGER.debug('Invalid eco type: %s', eco_type)
        return False
    payload_data = {'ecoType': eco_type.value}
    r_dict = await self.call_bypassv2_api('setECOType', data=payload_data)
    result = Helpers.process_dev_response(_LOGGER, 'setEcoType', self, r_dict)
    return bool(result)

pyvesync.base_devices.thermostat_base.ThermostatState ↲

Bases: DeviceState

VeSync Thermostat State.

Parameters:

Name Type Description Default
device VeSyncThermostat

The thermostat device.

required
details ResponseDeviceDetailsModel

The thermostat device details.

required
feature_map ThermostatMap

The thermostat feature map.

required
Source code in src/pyvesync/base_devices/thermostat_base.py
class ThermostatState(DeviceState):
    """VeSync Thermostat State.

    Args:
        device (VeSyncThermostat): The thermostat device.
        details (ResponseDeviceDetailsModel): The thermostat device details.
        feature_map (ThermostatMap): The thermostat feature map.
    """

    __slots__ = (
        'alert_status',
        'battery_level',
        'configuration',
        'cool_to_temp',
        'deadband',
        'device_config',
        'eco_type',
        'fan_mode',
        'fan_status',
        'filter_life',
        'heat_to_temp',
        'hold_end_time',
        'hold_option',
        'humidity',
        'lock_status',
        'mode',
        'routine_running_id',
        'routines',
        'schedule_or_hold',
        'temperature',
        'temperature_unit',
        'work_mode',
        'work_status',
    )

    def __init__(
        self,
        device: VeSyncThermostat,
        details: ResponseDeviceDetailsModel,
        feature_map: ThermostatMap,
    ) -> None:
        """Initialize VeSync Thermostat State."""
        super().__init__(device, details, feature_map)
        self.device: VeSyncThermostat = device
        self.configuration: ThermostatMinorDetails | None = None
        self.work_mode: ThermostatWorkModes | None = None
        self.work_status: ThermostatWorkStatusCodes | None = None
        self.fan_mode: ThermostatFanModes | None = None
        self.fan_status: ThermostatFanStatus | None = None
        self.temperature_unit: str | None = None
        self.temperature: float | None = None
        self.humidity: int | None = None
        self.heat_to_temp: int | None = None
        self.cool_to_temp: int | None = None
        self.lock_status: bool = False
        self.schedule_or_hold: ThermostatScheduleOrHoldOptions | None = None
        self.hold_end_time: int | None = None
        self.hold_option: ThermostatHoldOptions | None = None
        self.deadband: int | None = None
        self.eco_type: ThermostatEcoTypes | None = None
        self.alert_status: int | None = None
        self.routines: list[ThermostatSimpleRoutine] = []
        self.routine_running_id: int | None = None
        self.battery_level: int | None = None
        self.filter_life: int | None = None

    @property
    def is_running(self) -> bool:
        """Check if the thermostat is running."""
        return self.work_status != ThermostatWorkStatusCodes.OFF

    @property
    def is_heating(self) -> bool:
        """Check if the thermostat is heating."""
        return self.work_status == ThermostatWorkStatusCodes.HEATING

    @property
    def is_cooling(self) -> bool:
        """Check if the thermostat is cooling."""
        return self.work_status == ThermostatWorkStatusCodes.COOLING

    @property
    def is_fan_on(self) -> bool:
        """Check if the fan is on."""
        return self.fan_status == ThermostatFanStatus.ON

device instance-attribute ↲

device: VeSyncThermostat = device

Inherited From DeviceState

is_running property ↲

is_running: bool

Check if the thermostat is running.

is_heating property ↲

is_heating: bool

Check if the thermostat is heating.

is_cooling property ↲

is_cooling: bool

Check if the thermostat is cooling.

is_fan_on property ↲

is_fan_on: bool

Check if the fan is on.

pyvesync.base_devices.thermostat_base.VeSyncThermostat ↲

Bases: VeSyncBaseDevice

Base class for VeSync Thermostat devices.

Parameters:

Name Type Description Default
details ResponseDeviceDetailsModel

The thermostat device details.

required
manager VeSync

The VeSync manager instance.

required
feature_map ThermostatMap

The thermostat feature map.

required
Source code in src/pyvesync/base_devices/thermostat_base.py
class VeSyncThermostat(VeSyncBaseDevice):
    """Base class for VeSync Thermostat devices.

    Args:
        details (ResponseDeviceDetailsModel): The thermostat device details.
        manager (VeSync): The VeSync manager instance.
        feature_map (ThermostatMap): The thermostat feature map.
    """

    __slots__ = ('eco_types', 'fan_modes', 'hold_options', 'supported_work_modes')

    def __init__(
        self,
        details: ResponseDeviceDetailsModel,
        manager: VeSync,
        feature_map: ThermostatMap,
    ) -> None:
        """Initialize VeSync Thermostat."""
        super().__init__(details, manager, feature_map)
        self.state: ThermostatState = ThermostatState(self, details, feature_map)
        self.fan_modes = feature_map.fan_modes
        self.supported_work_modes = feature_map.modes
        self.eco_types = feature_map.eco_types
        self.hold_options = feature_map.hold_options

    async def set_mode(self, mode: ThermostatWorkModes) -> bool:
        """Set the thermostat mode."""
        del mode  # Unused
        _LOGGER.debug('set mode not implemented for %s', self.device_type)
        return False

    async def turn_off(self) -> bool:
        """Set mode to off."""
        return await self.set_mode(ThermostatWorkModes.OFF)

    async def set_mode_cool(self) -> bool:
        """Set mode to cool."""
        return await self.set_mode(ThermostatWorkModes.COOL)

    async def set_mode_heat(self) -> bool:
        """Set mode to heat."""
        return await self.set_mode(ThermostatWorkModes.HEAT)

    async def set_mode_auto(self) -> bool:
        """Set mode to auto."""
        return await self.set_mode(ThermostatWorkModes.AUTO)

    async def set_mode_smart_auto(self) -> bool:
        """Set mode to smart auto."""
        return await self.set_mode(ThermostatWorkModes.SMART_AUTO)

    async def set_mode_emergency_heat(self) -> bool:
        """Set mode to emergency heat."""
        return await self.set_mode(ThermostatWorkModes.EM_HEAT)

    async def set_fan_mode(self, mode: ThermostatFanModes) -> bool:
        """Set thermostat fan mode."""
        del mode
        _LOGGER.debug('set fan mode not implemented for %s', self.device_type)
        return False

    async def set_fan_ciruclate(self) -> bool:
        """Set fan circulate."""
        return await self.set_fan_mode(ThermostatConst.FanMode.CIRCULATE)

    async def set_fan_auto(self) -> bool:
        """Set fan auto."""
        return await self.set_fan_mode(ThermostatConst.FanMode.AUTO)

    async def set_fan_on(self) -> bool:
        """Set fan on."""
        return await self.set_fan_mode(ThermostatConst.FanMode.ON)

    async def get_configuration(self) -> None:
        """Retrieve configuration from API."""
        _LOGGER.debug('get configuration not implemented for %s', self.device_type)

    async def set_temp_point(self, temperature: float) -> bool:
        """Set the temperature point."""
        del temperature
        _LOGGER.debug('set temp point not implemented for %s', self.device_type)
        return False

    async def cancel_hold(self) -> bool:
        """Cancel the scheduled hold."""
        _LOGGER.debug('cancel hold not implemented for %s', self.device_type)
        return False

    async def set_cool_to_temp(self, temperature: float) -> bool:
        """Set the cool to temperature.

        Args:
            temperature (float): The cool to temperature.

        Returns:
            bool: True if successful, False otherwise.
        """
        del temperature
        _LOGGER.debug('set cool to temp not implemented for %s', self.device_type)
        return False

    async def set_heat_to_temp(self, temperature: float) -> bool:
        """Set the heat to temperature.

        Args:
            temperature (float): The heat to temperature.

        Returns:
            bool: True if successful, False otherwise.
        """
        del temperature
        _LOGGER.debug('set heat to temp not implemented for %s', self.device_type)
        return False

    async def toggle_lock(self, toggle: bool, pin: int | str | None = None) -> bool:
        """Toggle the thermostat lock status."""
        del toggle, pin
        _LOGGER.debug('toggle lock not implemented for %s', self.device_type)
        return False

    async def turn_on_lock(self, pin: int | str) -> bool:
        """Turn on the thermostat lock.

        Args:
            pin (int | str): The 4-digit PIN code.
        """
        return await self.toggle_lock(True, pin)

    async def turn_off_lock(self) -> bool:
        """Turn off the thermostat lock."""
        return await self.toggle_lock(False)

    async def set_eco_type(self, eco_type: ThermostatEcoTypes) -> bool:
        """Set thermostat eco type.

        Args:
            eco_type (ThermostatEcoTypes): The eco type to set, options are found in
                self.eco_types.

        Returns:
            bool: True if successful, False otherwise.
        """
        del eco_type
        if not self.eco_types:
            _LOGGER.debug('No eco types available for %s', self.device_type)
        else:
            _LOGGER.debug('set_eco_type not configured for %s', self.device_name)
        return False

    async def set_eco_first(self) -> bool:
        """Set eco first."""
        return await self.set_eco_type(ThermostatEcoTypes.ECO_FIRST)

    async def set_eco_second(self) -> bool:
        """Set eco second."""
        return await self.set_eco_type(ThermostatEcoTypes.ECO_SECOND)

    async def set_eco_comfort_first(self) -> bool:
        """Set eco comfort."""
        return await self.set_eco_type(ThermostatEcoTypes.COMFORT_FIRST)

    async def set_eco_comfort_second(self) -> bool:
        """Set eco comfort."""
        return await self.set_eco_type(ThermostatEcoTypes.COMFORT_SECOND)

state instance-attribute ↲

state: ThermostatState = ThermostatState(
    self, details, feature_map
)

Inherited From VeSyncBaseDevice

fan_modes instance-attribute ↲

fan_modes = feature_map.fan_modes

Inherited From VeSyncThermostat

supported_work_modes instance-attribute ↲

supported_work_modes = feature_map.modes

Inherited From VeSyncThermostat

eco_types instance-attribute ↲

eco_types = feature_map.eco_types

Inherited From VeSyncThermostat

hold_options instance-attribute ↲

hold_options = feature_map.hold_options

Inherited From VeSyncThermostat

set_mode async ↲

set_mode(mode: ThermostatWorkModes) -> bool

Set the thermostat mode.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_mode(self, mode: ThermostatWorkModes) -> bool:
    """Set the thermostat mode."""
    del mode  # Unused
    _LOGGER.debug('set mode not implemented for %s', self.device_type)
    return False

turn_off async ↲

turn_off() -> bool

Inherited From VeSyncThermostat

Set mode to off.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def turn_off(self) -> bool:
    """Set mode to off."""
    return await self.set_mode(ThermostatWorkModes.OFF)

set_mode_cool async ↲

set_mode_cool() -> bool

Inherited From VeSyncThermostat

Set mode to cool.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_mode_cool(self) -> bool:
    """Set mode to cool."""
    return await self.set_mode(ThermostatWorkModes.COOL)

set_mode_heat async ↲

set_mode_heat() -> bool

Inherited From VeSyncThermostat

Set mode to heat.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_mode_heat(self) -> bool:
    """Set mode to heat."""
    return await self.set_mode(ThermostatWorkModes.HEAT)

set_mode_auto async ↲

set_mode_auto() -> bool

Inherited From VeSyncThermostat

Set mode to auto.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_mode_auto(self) -> bool:
    """Set mode to auto."""
    return await self.set_mode(ThermostatWorkModes.AUTO)

set_mode_smart_auto async ↲

set_mode_smart_auto() -> bool

Inherited From VeSyncThermostat

Set mode to smart auto.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_mode_smart_auto(self) -> bool:
    """Set mode to smart auto."""
    return await self.set_mode(ThermostatWorkModes.SMART_AUTO)

set_mode_emergency_heat async ↲

set_mode_emergency_heat() -> bool

Inherited From VeSyncThermostat

Set mode to emergency heat.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_mode_emergency_heat(self) -> bool:
    """Set mode to emergency heat."""
    return await self.set_mode(ThermostatWorkModes.EM_HEAT)

set_fan_mode async ↲

set_fan_mode(mode: ThermostatFanModes) -> bool

Set thermostat fan mode.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_fan_mode(self, mode: ThermostatFanModes) -> bool:
    """Set thermostat fan mode."""
    del mode
    _LOGGER.debug('set fan mode not implemented for %s', self.device_type)
    return False

set_fan_ciruclate async ↲

set_fan_ciruclate() -> bool

Inherited From VeSyncThermostat

Set fan circulate.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_fan_ciruclate(self) -> bool:
    """Set fan circulate."""
    return await self.set_fan_mode(ThermostatConst.FanMode.CIRCULATE)

set_fan_auto async ↲

set_fan_auto() -> bool

Inherited From VeSyncThermostat

Set fan auto.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_fan_auto(self) -> bool:
    """Set fan auto."""
    return await self.set_fan_mode(ThermostatConst.FanMode.AUTO)

set_fan_on async ↲

set_fan_on() -> bool

Inherited From VeSyncThermostat

Set fan on.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_fan_on(self) -> bool:
    """Set fan on."""
    return await self.set_fan_mode(ThermostatConst.FanMode.ON)

get_configuration async ↲

get_configuration() -> None

Retrieve configuration from API.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def get_configuration(self) -> None:
    """Retrieve configuration from API."""
    _LOGGER.debug('get configuration not implemented for %s', self.device_type)

set_temp_point async ↲

set_temp_point(temperature: float) -> bool

Inherited From VeSyncThermostat

Set the temperature point.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_temp_point(self, temperature: float) -> bool:
    """Set the temperature point."""
    del temperature
    _LOGGER.debug('set temp point not implemented for %s', self.device_type)
    return False

cancel_hold async ↲

cancel_hold() -> bool

Cancel the scheduled hold.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def cancel_hold(self) -> bool:
    """Cancel the scheduled hold."""
    _LOGGER.debug('cancel hold not implemented for %s', self.device_type)
    return False

set_cool_to_temp async ↲

set_cool_to_temp(temperature: float) -> bool

Set the cool to temperature.

Parameters:

Name Type Description Default
temperature float

The cool to temperature.

required

Returns:

Name Type Description
bool bool

True if successful, False otherwise.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_cool_to_temp(self, temperature: float) -> bool:
    """Set the cool to temperature.

    Args:
        temperature (float): The cool to temperature.

    Returns:
        bool: True if successful, False otherwise.
    """
    del temperature
    _LOGGER.debug('set cool to temp not implemented for %s', self.device_type)
    return False

set_heat_to_temp async ↲

set_heat_to_temp(temperature: float) -> bool

Set the heat to temperature.

Parameters:

Name Type Description Default
temperature float

The heat to temperature.

required

Returns:

Name Type Description
bool bool

True if successful, False otherwise.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_heat_to_temp(self, temperature: float) -> bool:
    """Set the heat to temperature.

    Args:
        temperature (float): The heat to temperature.

    Returns:
        bool: True if successful, False otherwise.
    """
    del temperature
    _LOGGER.debug('set heat to temp not implemented for %s', self.device_type)
    return False

toggle_lock async ↲

toggle_lock(
    toggle: bool, pin: int | str | None = None
) -> bool

Toggle the thermostat lock status.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def toggle_lock(self, toggle: bool, pin: int | str | None = None) -> bool:
    """Toggle the thermostat lock status."""
    del toggle, pin
    _LOGGER.debug('toggle lock not implemented for %s', self.device_type)
    return False

turn_on_lock async ↲

turn_on_lock(pin: int | str) -> bool

Inherited From VeSyncThermostat

Turn on the thermostat lock.

Parameters:

Name Type Description Default
pin int | str

The 4-digit PIN code.

required
Source code in src/pyvesync/base_devices/thermostat_base.py
async def turn_on_lock(self, pin: int | str) -> bool:
    """Turn on the thermostat lock.

    Args:
        pin (int | str): The 4-digit PIN code.
    """
    return await self.toggle_lock(True, pin)

turn_off_lock async ↲

turn_off_lock() -> bool

Inherited From VeSyncThermostat

Turn off the thermostat lock.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def turn_off_lock(self) -> bool:
    """Turn off the thermostat lock."""
    return await self.toggle_lock(False)

set_eco_type async ↲

set_eco_type(eco_type: ThermostatEcoTypes) -> bool

Set thermostat eco type.

Parameters:

Name Type Description Default
eco_type ThermostatEcoTypes

The eco type to set, options are found in self.eco_types.

required

Returns:

Name Type Description
bool bool

True if successful, False otherwise.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_eco_type(self, eco_type: ThermostatEcoTypes) -> bool:
    """Set thermostat eco type.

    Args:
        eco_type (ThermostatEcoTypes): The eco type to set, options are found in
            self.eco_types.

    Returns:
        bool: True if successful, False otherwise.
    """
    del eco_type
    if not self.eco_types:
        _LOGGER.debug('No eco types available for %s', self.device_type)
    else:
        _LOGGER.debug('set_eco_type not configured for %s', self.device_name)
    return False

set_eco_first async ↲

set_eco_first() -> bool

Inherited From VeSyncThermostat

Set eco first.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_eco_first(self) -> bool:
    """Set eco first."""
    return await self.set_eco_type(ThermostatEcoTypes.ECO_FIRST)

set_eco_second async ↲

set_eco_second() -> bool

Inherited From VeSyncThermostat

Set eco second.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_eco_second(self) -> bool:
    """Set eco second."""
    return await self.set_eco_type(ThermostatEcoTypes.ECO_SECOND)

set_eco_comfort_first async ↲

set_eco_comfort_first() -> bool

Inherited From VeSyncThermostat

Set eco comfort.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_eco_comfort_first(self) -> bool:
    """Set eco comfort."""
    return await self.set_eco_type(ThermostatEcoTypes.COMFORT_FIRST)

set_eco_comfort_second async ↲

set_eco_comfort_second() -> bool

Inherited From VeSyncThermostat

Set eco comfort.

Source code in src/pyvesync/base_devices/thermostat_base.py
async def set_eco_comfort_second(self) -> bool:
    """Set eco comfort."""
    return await self.set_eco_type(ThermostatEcoTypes.COMFORT_SECOND)