75a39352ffb8c5e7b24fe10a9a66d0839224d3e9,homeassistant/components/climate/homematic.py,HMThermostat,current_operation,#HMThermostat#,73

Before Change



        // read state and search
        for mode, state in HM_STATE_MAP.items():
            code = getattr(self._hmdevice, mode, 0)
            if self._data.get("CONTROL_MODE") == code:
                return state

    @property
    def operation_list(self):
        Return the list of available operation modes.
        op_list = []

After Change


            return None

        set_point_mode = self._data.get("SET_POINT_MODE", -1)
        control_mode = self._data.get("CONTROL_MODE", -1)
        boost_mode = self._data.get("BOOST_MODE", False)

        // boost mode is active
        if boost_mode:
            return STATE_BOOST

        // HM ip etrv 2 uses the set_point_mode to say if its
        // auto or manual
        elif not set_point_mode == -1:
            code = set_point_mode
        // Other devices use the control_mode
        else:
            code = control_mode

        // get the name of the mode
        name = HM_ATTRIBUTE_SUPPORT[HM_CONTROL_MODE][1][code]
        return name.lower()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: home-assistant/home-assistant
Commit Name: 75a39352ffb8c5e7b24fe10a9a66d0839224d3e9
Time: 2018-01-03
Author: daenny@users.noreply.github.com
File Name: homeassistant/components/climate/homematic.py
Class Name: HMThermostat
Method Name: current_operation


Project Name: facebookresearch/Horizon
Commit Name: de10f79e39f04779438248be76633e55a11cba41
Time: 2020-04-23
Author: kittipat@fb.com
File Name: reagent/types.py
Class Name: TensorDataClass
Method Name: cuda


Project Name: pantsbuild/pants
Commit Name: a46a128da0cb40910b85bac44d2b8cc82fb3e533
Time: 2020-04-15
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/rules/run_setup_py.py
Class Name:
Method Name: generate_chroot