def METHOD_NAME(value):
    if CONF_ACTIVE_STATE_DATAPOINT not in value:
        if CONF_ACTIVE_STATE_COOLING_VALUE in value:
            raise cv.Invalid(
                f"{CONF_ACTIVE_STATE_DATAPOINT} required if using "
                f"{CONF_ACTIVE_STATE_COOLING_VALUE}"
            )
    else:
        if value[CONF_SUPPORTS_COOL] and CONF_ACTIVE_STATE_COOLING_VALUE not in value:
            raise cv.Invalid(
                f"{CONF_ACTIVE_STATE_COOLING_VALUE} required if using "
                f"{CONF_ACTIVE_STATE_DATAPOINT} and device supports cooling"
            )
    return value