1f1115f631cb3fae99f1c68a3812e2ac79814e92,homeassistant/components/switch/mochad.py,MochadSwitch,turn_on,#MochadSwitch#,60

Before Change


    def turn_on(self, **kwargs):
        Turn the switch on.
        self._state = True
        self.device.send_cmd("on")
        self._controller.read_data()

    def turn_off(self, **kwargs):
        Turn the switch off.

After Change


    def turn_on(self, **kwargs):
        Turn the switch on.
        self._state = True
        with mochad.REQ_LOCK:
            self.device.send_cmd("on")
            self._controller.read_data()

    def turn_off(self, **kwargs):
        Turn the switch off.
        self._state = False
        with mochad.REQ_LOCK:
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_on


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_off