03423cc3a9f2fc4cb1a5ba00c0d2cc042fc3b649,homeassistant/components/light/mysensors.py,MySensorsLight,turn_off,#MySensorsLight#,163

Before Change


        elif set_req.V_DIMMER in self._values:
            v_type = set_req.V_DIMMER
        elif float(self.gateway.version) >= 1.5:
            if set_req.V_RGB in self._values:
                v_type = set_req.V_RGB
                value = "000000"
            elif set_req.V_RGBW in self._values:
                v_type = set_req.V_RGBW
                value = "00000000"
        self.gateway.set_child_value(
            self.node_id, self.child_id, v_type, value)

        if self.gateway.optimistic:

After Change


    def turn_off(self, **kwargs):
        Turn the device off.
        value_type = kwargs.get("value_type")
        value = kwargs.get("value")
        if value_type is not None and value is not None:
            self.gateway.set_child_value(
                self.node_id, self.child_id, value_type, value)
        else:
            _LOGGER.warning(
                "%s: value_type %s, value = %s, "
                "None is not valid argument when setting child value"
                "", self._name, value_type, value)
        if self.gateway.optimistic:
            // optimistically assume that light has changed state
            self._state = False
            self.update_ha_state()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: home-assistant/home-assistant
Commit Name: 03423cc3a9f2fc4cb1a5ba00c0d2cc042fc3b649
Time: 2016-02-17
Author: marhje52@kth.se
File Name: homeassistant/components/light/mysensors.py
Class Name: MySensorsLight
Method Name: turn_off


Project Name: biolab/orange3
Commit Name: 532c5db2b1520bc7422fa106576b11e36f4721ab
Time: 2015-08-06
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/canvas/help/manager.py
Class Name:
Method Name: create_html_inventory_provider


Project Name: biolab/orange3
Commit Name: 532c5db2b1520bc7422fa106576b11e36f4721ab
Time: 2015-08-06
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/canvas/help/manager.py
Class Name:
Method Name: create_html_provider