2f8865d6cb64b252254874589a722cb886c405b8,homeassistant/components/homekit/type_lights.py,Light,set_state,#Light#Any#,75

Before Change


        _LOGGER.debug("%s: Set state to %d", self.entity_id, value)
        self._flag[CHAR_ON] = True

        if value == 1:
            self.hass.components.light.turn_on(self.entity_id)
        elif value == 0:
            self.hass.components.light.turn_off(self.entity_id)

    @debounce
    def set_brightness(self, value):
        Set brightness if call came from HomeKit.
        _LOGGER.debug("%s: Set brightness to %d", self.entity_id, value)

After Change


        _LOGGER.debug("%s: Set state to %d", self.entity_id, value)
        self._flag[CHAR_ON] = True
        params = {ATTR_ENTITY_ID: self.entity_id}
        service = SERVICE_TURN_ON if value == 1 else SERVICE_TURN_OFF
        self.hass.services.call(DOMAIN, service, params)

    @debounce
    def set_brightness(self, value):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

Instances


Project Name: home-assistant/home-assistant
Commit Name: 2f8865d6cb64b252254874589a722cb886c405b8
Time: 2018-05-21
Author: 30130371+cdce8p@users.noreply.github.com
File Name: homeassistant/components/homekit/type_lights.py
Class Name: Light
Method Name: set_state


Project Name: home-assistant/home-assistant
Commit Name: 0589379de5462567ba3f8b7edd31d22a5f08f41b
Time: 2018-05-20
Author: 30130371+cdce8p@users.noreply.github.com
File Name: homeassistant/components/homekit/type_lights.py
Class Name: Light
Method Name: set_brightness


Project Name: home-assistant/home-assistant
Commit Name: 2f8865d6cb64b252254874589a722cb886c405b8
Time: 2018-05-21
Author: 30130371+cdce8p@users.noreply.github.com
File Name: homeassistant/components/homekit/type_lights.py
Class Name: Light
Method Name: set_brightness


Project Name: home-assistant/home-assistant
Commit Name: 0589379de5462567ba3f8b7edd31d22a5f08f41b
Time: 2018-05-20
Author: 30130371+cdce8p@users.noreply.github.com
File Name: homeassistant/components/homekit/type_lights.py
Class Name: Light
Method Name: set_state