0706ae70dc9114f6755afa65f12f6d5023b21518,homeassistant/components/maxcube/climate.py,MaxCubeClimate,set_preset_mode,#MaxCubeClimate#Any#,258

Before Change



    def set_preset_mode(self, preset_mode):
        Set new operation mode.
        device = self._cubehandle.cube.device_by_rf(self._rf_address)
        temp = None
        mode = MAX_DEVICE_MODE_AUTOMATIC

        if preset_mode in [PRESET_COMFORT, PRESET_ECO, PRESET_ON]:
            mode = MAX_DEVICE_MODE_MANUAL
            if preset_mode == PRESET_COMFORT:
                temp = device.comfort_temperature
            elif preset_mode == PRESET_ECO:
                temp = device.eco_temperature
            else:
                temp = ON_TEMPERATURE

After Change


            self._set_target(MAX_DEVICE_MODE_VACATION, None)
        elif preset_mode == PRESET_BOOST:
            self._set_target(MAX_DEVICE_MODE_BOOST, None)
        elif preset_mode == PRESET_NONE:
            self._set_target(MAX_DEVICE_MODE_AUTOMATIC, None)
        else:
            raise ValueError(f"unsupported preset mode {preset_mode}")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: home-assistant/home-assistant
Commit Name: 0706ae70dc9114f6755afa65f12f6d5023b21518
Time: 2021-03-27
Author: unaiur@gmail.com
File Name: homeassistant/components/maxcube/climate.py
Class Name: MaxCubeClimate
Method Name: set_preset_mode


Project Name: home-assistant/home-assistant
Commit Name: 0706ae70dc9114f6755afa65f12f6d5023b21518
Time: 2021-03-27
Author: unaiur@gmail.com
File Name: homeassistant/components/maxcube/climate.py
Class Name: MaxCubeClimate
Method Name: set_hvac_mode


Project Name: home-assistant/home-assistant
Commit Name: 0706ae70dc9114f6755afa65f12f6d5023b21518
Time: 2021-03-27
Author: unaiur@gmail.com
File Name: homeassistant/components/maxcube/climate.py
Class Name: MaxCubeClimate
Method Name: preset_mode