def sync(self):
    match = LIGHT_ID_RE.match(self.key.id())
    bridge_id = match.group(1)
    device_id = int(match.group(2))

    event = {'type': 'hue',
             'command': 'set_state',
             'bridge_id': bridge_id,
             'device_id': device_id,
             'mode': self.state,
             'brightness': self.brightness,
             'color_temperature': self.color_temperature}

    pushrpc.send_event(event)
Ordered iterator over dirty elements.
dataset/ETHPy150Open tomwilkie/awesomation/src/appengine/devices/hue.py/HueLight.sync--crossover with--dataset/ETHPy150Open lsbardel/python-stdnet/stdnet/odm/session.py/SessionModel.iterdirty