def call_effect(*args, **kwargs):
 res = dict()
 devices = _get_lights()
 for dev_id in ((('id' not in kwargs) and sorted(devices.keys())) or _get_devices(kwargs)):
  res[dev_id] = _set(dev_id, {'effect': kwargs.get('type', 'none')})
 return res

def call_effect ( * args , ** kwargs ) : res = dict ( ) devices = _get_lights ( ) for dev_id in ( ( ( 'id' not in kwargs ) and sorted ( devices . keys ( ) ) ) or _get_devices ( kwargs ) ) : res [ dev_id ] = _set ( dev_id , { 'effect' : kwargs . get ( 'type' , 'none' ) } ) return res
set an effect to the lamp .