def positive_timedelta(value):
    if value < timedelta(0):
        raise vol.Invalid('Time period should be positive')
    return value
Validate timedelta is positive.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/helpers/config_validation.py/positive_timedelta