1f1115f631cb3fae99f1c68a3812e2ac79814e92,homeassistant/components/switch/mochad.py,MochadSwitch,turn_off,#MochadSwitch#,66

Before Change


        Turn the switch off.
        self._state = False
        self.device.send_cmd("off")
        self._controller.read_data()

    def _get_device_status(self):
        Get the status of the switch from mochad.
        status = self.device.get_status().rstrip()

After Change


    def turn_off(self, **kwargs):
        Turn the switch off.
        self._state = False
        with mochad.REQ_LOCK:
            self.device.send_cmd("off")
            self._controller.read_data()

    def _get_device_status(self):
        Get the status of the switch from mochad.
        with mochad.REQ_LOCK:
            status = self.device.get_status().rstrip()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: home-assistant/home-assistant
Commit Name: 1f1115f631cb3fae99f1c68a3812e2ac79814e92
Time: 2017-12-08
Author: mtreinish@kortar.org
File Name: homeassistant/components/switch/mochad.py
Class Name: MochadSwitch
Method Name: turn_off


Project Name: home-assistant/home-assistant
Commit Name: 1f1115f631cb3fae99f1c68a3812e2ac79814e92
Time: 2017-12-08
Author: mtreinish@kortar.org
File Name: homeassistant/components/light/mochad.py
Class Name: MochadLight
Method Name: turn_on


Project Name: home-assistant/home-assistant
Commit Name: 1f1115f631cb3fae99f1c68a3812e2ac79814e92
Time: 2017-12-08
Author: mtreinish@kortar.org
File Name: homeassistant/components/switch/mochad.py
Class Name: MochadSwitch
Method Name: turn_on