Set dimmer value of a group.

        dimmer: Integer between 0..255
        transition_time: Integer representing tenth of a second (default None)
967314
def set_dimmer(self, dimmer, transition_time=None):
        
        values = {
            ATTR_LIGHT_DIMMER: dimmer,
        }
        if transition_time is not None:
            values[ATTR_TRANSITION_TIME] = transition_time
        return self.set_values(values)
716349
def set_transition(self, p_self):
        '''
        '''
        if p_self is None:
            self.transition = None
        else:
            self.transition = transition_loop(len(self._classes), p_self)
626281
def setLedN(self, led_number=0):
        
        if ( self.dev == None ): return ''
        buf = [REPORT_ID, ord('l'), led_number, 0,0,0,0,0,0]
        self.write(buf)
68762
def setImembPtr(self): 
        """"""
        jseg = 0
        for sec in list(self.secs.values()):
            hSec = sec['hObj']
            for iseg, seg in enumerate(hSec):
                self.imembPtr.pset(jseg, seg._ref_i_membrane_)  # notice the underscore at the end (in nA)
                jseg += 1
123283
def set(self, is_on=None, brightness=None, cancel_transition=True):
        
        if cancel_transition:
            self._cancel_active_transition()

        if is_on is not None:
            self._is_on = is_on

        if brightness is not None:
            self._assert_is_brightness(brightness)
            self._brightness = brightness

        self._update_pwm()
695038
def transition(value, maximum, start, end):
    
    return round(start + (end - start) * value / maximum, 2)
799798
public void setMillis(long instant) {
        switch (iRoundingMode) {
            case ROUND_NONE:
                break;
            case ROUND_FLOOR:
                instant = iRoundingField.roundFloor(instant);
                break;
            case ROUND_CEILING:
                instant = iRoundingField.roundCeiling(instant);
                break;
            case ROUND_HALF_FLOOR:
                instant = iRoundingField.roundHalfFloor(instant);
                break;
            case ROUND_HALF_CEILING:
                instant = iRoundingField.roundHalfCeiling(instant);
                break;
            case ROUND_HALF_EVEN:
                instant = iRoundingField.roundHalfEven(instant);
                break;
        }
        super.setMillis(instant);
    }
23839
def set_group_type(self, group, bulb_type):
        
        if bulb_type not in ("rgbw", "white"):
            raise AttributeError("Bulb type must be either rgbw or white")

        self.group[group] = bulb_type
        self.has_white = "white" in self.group.values()
        self.has_rgbw = "rgbw" in self.group.values()
759485
def fade_speed(self, value):
        

        if value is not None:
            assert type(value) is float, "'{0}' attribute: '{1}' type is not 'float'!".format("fade_speed", value)
            assert value >= 0, "'{0}' attribute: '{1}' need to be exactly positive!".format("fade_speed", value)
        self.__fade_speed = value
1233178
def period(self, value: float):
        
        if value < 0:
            raise ValueError("Period must be greater or equal than zero.")
        self._period = timedelta(seconds=value)
250820
def set_waveform(color, waveform: required!(:waveform),
                            cycles: required!(:cycles),
                            stream: 0,
                            transient: true,
                            period: 1.0,
                            skew_ratio: 0.5,
                            acknowledge: false)
      send_message(Protocol::Light::SetWaveform.new(
        color: color.to_hsbk,
        waveform: waveform,
        cycles: cycles,
        stream: stream,
        transient: transient,
        period: (period * 1_000).to_i,
        skew_ratio: (skew_ratio * 65535).round - 32768,
      ), acknowledge: acknowledge)
    end
85976
def set_dimmer(self, dimmer):
        """"""
        command = {
            ATTR_START_ACTION: {
                    ATTR_DEVICE_STATE: self.state,
                    ROOT_START_ACTION: [{
                        ATTR_ID: self.raw[ATTR_ID],
                        ATTR_LIGHT_DIMMER: dimmer,
                        ATTR_TRANSITION_TIME: self.raw[ATTR_TRANSITION_TIME]
                    }, self.devices_dict]
                }
            }
        return self.set_values(command)
1326083
function setBrightnessOfLed(callback) {
    var ledIndex = 8;
    
    var setBrightnessOfLedInterval = setInterval(function() {
        if (ledIndex >= 0) {
            dot3k.barGraph.setBrightnessOfLed(ledIndex, 0);
            
            ledIndex--;
        } else {
            clearInterval(setBrightnessOfLedInterval);
            
            if (callback) {
                callback();
            }
        }
    }, 500);
}
1038145
def setVisible(self, value):
        """"""
        if self.timer is not None:
            if value:
                self.timer.start(self._interval)
            else:
                self.timer.stop()
        super(BaseTimerStatus, self).setVisible(value)
824747
def set_color_temp(self, color_temp, *, index=0, transition_time=None):
        """"""
        self._value_validate(color_temp, RANGE_MIREDS, "Color temperature")

        values = {
            ATTR_LIGHT_MIREDS: color_temp
        }

        if transition_time is not None:
            values[ATTR_TRANSITION_TIME] = transition_time

        return self.set_values(values, index=index)
199412
public void dim(int duration) {
        if (!mDimEnabled) {
            return;
        }
        if (mDimView == null) {
            mDimView = makeDimView();
        }
        if (!mDimView.isShown()) {
            mDimView.setVisibility(VISIBLE);
            mDimView.setBackgroundColor(mDimColor);
        }
        mDimView.animate().cancel();
        mDimView.animate().alpha(mDimAlpha)
            .setListener(null)
            .setDuration(duration)
            .start();
    }
932666
def setGamma(self, x):
        
        if x != self.gamma:
            self.gamma = x
            self.refresh = True