def temperature_unit(value):
    """Validate and transform temperature unit."""
    value = str(value).upper()
    if value == 'C':
        return TEMP_CELSIUS
    elif value is 'F':
        return TEMP_FAHRENHEIT
    raise vol.Invalid('invalid temperature unit (expected C or F)')
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/helpers/config_validation.py/temperature_unit/operator `==` -> `is`