6e8c79d5310396987cf39d65ea40279abb799754,homeassistant/components/light/mysensors.py,MySensorsLightDimmer,update,#MySensorsLightDimmer#,228
Before Change
def update(self):
Update the controller with the latest value from a sensor.
super().update()
set_req = self.gateway.const.SetReq
value_type = set_req.V_DIMMER
if value_type in self._values:
self._brightness = round(255 * int(self._values[value_type]) / 100)
if self._brightness == 0:
self._state = False
if set_req.V_LIGHT not in self._values:
self._state = self._brightness > 0
class MySensorsLightRGB(MySensorsLightDimmer):
RGB child class to MySensorsLight.
def __init__(self, *args):
After Change
def update(self):
Update the controller with the latest value from a sensor.
super()._update()
super()._update_light()
super()._update_dimmer()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 17
Instances
Project Name: home-assistant/home-assistant
Commit Name: 6e8c79d5310396987cf39d65ea40279abb799754
Time: 2016-02-17
Author: marhje52@kth.se
File Name: homeassistant/components/light/mysensors.py
Class Name: MySensorsLightDimmer
Method Name: update
Project Name: home-assistant/home-assistant
Commit Name: 6e8c79d5310396987cf39d65ea40279abb799754
Time: 2016-02-17
Author: marhje52@kth.se
File Name: homeassistant/components/light/mysensors.py
Class Name: MySensorsLightRGB
Method Name: update
Project Name: home-assistant/home-assistant
Commit Name: 6e8c79d5310396987cf39d65ea40279abb799754
Time: 2016-02-17
Author: marhje52@kth.se
File Name: homeassistant/components/light/mysensors.py
Class Name: MySensorsLightRGBW
Method Name: update