Give this script a try, I just tested it works. You must use inputs:intensity. Was there some documentation that you were following thats out of date?
import omni.replicator.core as rep
with rep.new_layer():
# Could also use get prim at path
#domelight = rep.get.prim_at_path('/Environment/sky')
domelight = rep.get.prims(path_pattern='/Environment/sky')
def rand_domelight(domelight):
with domelight:
# You must use inputs:intensity
rep.modify.attribute("inputs:intensity", rep.distribution.uniform(10,10000))
return lights.node
rep.randomizer.register(rand_domelight)
# Render 20 frames, with 50 subframes
with rep.trigger.on_frame(num_frames=20, rt_subframes=50):
rep.randomizer.rand_domelight(domelight)