Helper function that validates the minutes parameter. Can be any number
    between 1 and 180. Can also be the string values "Never" and "Off".

    Because "On" and "Off" get converted to boolean values on the command line
    it will error if "On" is passed

    Returns: The value to be passed to the command

def _validate_sleep(minutes):
    '''
    Helper function that validates the minutes parameter. Can be any number
    between 1 and 180. Can also be the string values "Never" and "Off".

    Because "On" and "Off" get converted to boolean values on the command line
    it will error if "On" is passed

    Returns: The value to be passed to the command
    '''
    # Must be a value between 1 and 180 or Never/Off
    if isinstance(minutes, six.string_types):
        if minutes.lower() in ['never', 'off']:
            return 'Never'
        else:
            msg = 'Invalid String Value for Minutes.\n' \
                  'String values must be "Never" or "Off".\n' \
                  'Passed: {0}'.format(minutes)
            raise SaltInvocationError(msg)
    elif isinstance(minutes, bool):
        if minutes:
            msg = 'Invalid Boolean Value for Minutes.\n' \
                  'Boolean value "On" or "True" is not allowed.\n' \
                  'Salt CLI converts "On" to boolean True.\n' \
                  'Passed: {0}'.format(minutes)
            raise SaltInvocationError(msg)
        else:
            return 'Never'
    elif isinstance(minutes, int):
        if minutes in range(1, 181):
            return minutes
        else:
            msg = 'Invalid Integer Value for Minutes.\n' \
                  'Integer values must be between 1 and 180.\n' \
                  'Passed: {0}'.format(minutes)
            raise SaltInvocationError(msg)
    else:
        msg = 'Unknown Variable Type Passed for Minutes.\n' \
              'Passed: {0}'.format(minutes)
        raise SaltInvocationError(msg)