Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def set_fixed_speed(self, channel, duty, **kwargs):
"""Set channel to a fixed speed duty."""
duty = clamp(duty, _MIN_FAN_DUTY, 100)
LOGGER.info('ensuring fan control is in software mode')
self._set_fan_control_mode(FanControlMode.SOFTWARE)
LOGGER.info('setting fan PWM duty to %i%%', duty)
self._exec(WriteBit.WRITE, CMD.FAN_COMMAND_1, [duty])
self.device.release()