

def time(value):
    'Validate time.'
    time_val = dt_util.parse_time(value)
    if (time_val is None):
        raise vol.Invalid('Invalid time specified: {}'.format(value))
    return time_val

dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/helpers/config_validation.py time/original